Replace DisplayList::is_contentful with tracking during conversion to WR display lists

This commit is contained in:
Simon Sapin 2019-09-06 17:11:36 +02:00
parent 526619a78a
commit e9f7079c70
8 changed files with 53 additions and 42 deletions

View file

@ -1342,7 +1342,7 @@ impl LayoutThread {
debug!("Layout done!");
// TODO: Avoid the temporary conversion and build webrender sc/dl directly!
let builder = display_list.convert_to_webrender(self.id);
let (builder, is_contentful) = display_list.convert_to_webrender(self.id);
let viewport_size = Size2D::new(
self.viewport_size.width.to_f32_px(),
@ -1359,7 +1359,7 @@ impl LayoutThread {
// 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, &display_list);
.maybe_observe_paint_time(self, epoch, is_contentful.0);
let mut txn = webrender_api::Transaction::new();
txn.set_display_list(