mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove unecessary webrender document from layout.
This commit is contained in:
parent
75efaa95f5
commit
abc689e034
7 changed files with 20 additions and 67 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue