diff options
author | Josh Matthews <josh@joshmatthews.net> | 2020-06-08 15:04:37 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2020-06-09 13:05:16 -0400 |
commit | abc689e03437cc708f9941221307cefc69ad0c47 (patch) | |
tree | 895b4218c8625aca78b2dcb12a9f70e161be31ad /components/layout_thread_2020/lib.rs | |
parent | 75efaa95f53dd0f110d02d5d4009bb491290af4d (diff) | |
download | servo-abc689e03437cc708f9941221307cefc69ad0c47.tar.gz servo-abc689e03437cc708f9941221307cefc69ad0c47.zip |
Remove unecessary webrender document from layout.
Diffstat (limited to 'components/layout_thread_2020/lib.rs')
-rw-r--r-- | components/layout_thread_2020/lib.rs | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/components/layout_thread_2020/lib.rs b/components/layout_thread_2020/lib.rs index fd0d22fc67b..3bb0a7a3353 100644 --- a/components/layout_thread_2020/lib.rs +++ b/components/layout_thread_2020/lib.rs @@ -191,9 +191,6 @@ pub struct LayoutThread { /// Webrender interface. webrender_api: WebrenderIpcSender, - /// Webrender document. - webrender_document: webrender_api::DocumentId, - /// Paint time metrics. paint_time_metrics: PaintTimeMetrics, @@ -245,7 +242,6 @@ impl LayoutThreadFactory for LayoutThread { time_profiler_chan: profile_time::ProfilerChan, mem_profiler_chan: profile_mem::ProfilerChan, webrender_api_sender: WebrenderIpcSender, - webrender_document: webrender_api::DocumentId, paint_time_metrics: PaintTimeMetrics, busy: Arc<AtomicBool>, load_webfonts_synchronously: bool, @@ -294,7 +290,6 @@ impl LayoutThreadFactory for LayoutThread { time_profiler_chan, mem_profiler_chan.clone(), webrender_api_sender, - webrender_document, paint_time_metrics, busy, load_webfonts_synchronously, @@ -463,7 +458,6 @@ impl LayoutThread { time_profiler_chan: profile_time::ProfilerChan, mem_profiler_chan: profile_mem::ProfilerChan, webrender_api_sender: WebrenderIpcSender, - webrender_document: webrender_api::DocumentId, paint_time_metrics: PaintTimeMetrics, busy: Arc<AtomicBool>, load_webfonts_synchronously: bool, @@ -477,7 +471,7 @@ impl LayoutThread { trace_layout: bool, ) -> LayoutThread { // Let webrender know about this pipeline by sending an empty display list. - webrender_api_sender.send_initial_transaction(webrender_document, id.to_webrender()); + webrender_api_sender.send_initial_transaction(id.to_webrender()); // The device pixel ratio is incorrect (it does not have the hidpi value), // but it will be set correctly when the initial reflow takes place. @@ -521,7 +515,6 @@ impl LayoutThread { epoch: Cell::new(Epoch(1)), viewport_size: Size2D::new(Au(0), Au(0)), webrender_api: webrender_api_sender, - webrender_document, stylist: Stylist::new(device, QuirksMode::NoQuirks), rw_data: Arc::new(Mutex::new(LayoutThreadData { constellation_chan: constellation_chan, @@ -737,7 +730,6 @@ impl LayoutThread { let point = Point2D::new(-state.scroll_offset.x, -state.scroll_offset.y); self.webrender_api.send_scroll_node( - self.webrender_document, webrender_api::units::LayoutPoint::from_untyped(point), state.scroll_id, webrender_api::ScrollClamping::ToContentBounds, @@ -823,7 +815,6 @@ impl LayoutThread { self.time_profiler_chan.clone(), self.mem_profiler_chan.clone(), self.webrender_api.clone(), - self.webrender_document, info.paint_time_metrics, info.layout_is_busy, self.load_webfonts_synchronously, @@ -1231,7 +1222,6 @@ impl LayoutThread { let client_point = webrender_api::units::WorldPoint::from_untyped(client_point); let results = self.webrender_api.hit_test( - self.webrender_document, Some(self.id.to_webrender()), client_point, flags, @@ -1349,12 +1339,8 @@ impl LayoutThread { self.viewport_size.width.to_f32_px(), self.viewport_size.height.to_f32_px(), )); - self.webrender_api.send_display_list( - self.webrender_document, - epoch, - viewport_size, - display_list.wr.finalize(), - ); + self.webrender_api + .send_display_list(epoch, viewport_size, display_list.wr.finalize()); if self.trace_layout { layout_debug::end_trace(self.generation.get()); |