Clean up and document the send_display_list interface

This moves more members to the CompositorDisplayListInfo struct, which
now holds all miscellaneous, non-WebRender data when sending display
lists. It also documents what each things sent with a display list does.
This commit is contained in:
Martin Robinson 2023-05-16 09:18:03 +02:00
parent 0377a1853a
commit 4d3625ec80
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
8 changed files with 85 additions and 79 deletions

View file

@ -1069,26 +1069,22 @@ impl LayoutThread {
self.viewport_size.height.to_f32_px(),
);
// TODO: Avoid the temporary conversion and build webrender sc/dl directly!
let (builder, compositor_info, is_contentful) =
display_list.convert_to_webrender(self.id, viewport_size);
let mut epoch = self.epoch.get();
epoch.next();
self.epoch.set(epoch);
// TODO: Avoid the temporary conversion and build webrender sc/dl directly!
let (builder, compositor_info, is_contentful) =
display_list.convert_to_webrender(self.id, viewport_size, epoch.into());
// Observe notifications about rendered frames if needed right before
// sending the display list to WebRender in order to set time related
// Progressive Web Metrics.
self.paint_time_metrics
.maybe_observe_paint_time(self, epoch, is_contentful.0);
self.webrender_api.send_display_list(
epoch,
viewport_size,
compositor_info,
builder.finalize(),
);
self.webrender_api
.send_display_list(compositor_info, builder.finalize());
},
);
}