From 11822f3eb14ab3622f54652c77f2f3742d733961 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 7 Aug 2015 18:06:16 -0700 Subject: [PATCH] layout: Remove the now-useless `dirty` field from the layout context. At this point the only thing it does is to try to avoid adding display items that are outside the root scrollable area, which is both wrong (since it's incompatible with having scrollable areas outside the root) and is useless (because we have displayports now). --- components/layout/context.rs | 3 --- components/layout/display_list_builder.rs | 9 +-------- components/layout/layout_task.rs | 8 -------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/components/layout/context.rs b/components/layout/context.rs index b2d80110f87..96fdc31beac 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -109,9 +109,6 @@ pub struct SharedLayoutContext { /// The URL. pub url: Url, - /// The dirty rectangle, used during display list building. - pub dirty: Rect, - /// Starts at zero, and increased by one every time a layout completes. /// This can be used to easily check for invalid stale data. pub generation: u32, diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index af143586513..e30a7d08635 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -900,11 +900,9 @@ impl FragmentDisplayListBuilding for Fragment { relative_containing_block_mode, CoordinateSystem::Own); - debug!("Fragment::build_display_list at rel={:?}, abs={:?}, dirty={:?}, flow origin={:?}: \ - {:?}", + debug!("Fragment::build_display_list at rel={:?}, abs={:?}, flow origin={:?}: {:?}", self.border_box, stacking_relative_border_box, - layout_context.shared.dirty, stacking_relative_flow_origin, self); @@ -913,11 +911,6 @@ impl FragmentDisplayListBuilding for Fragment { return } - if !stacking_relative_border_box.intersects(&layout_context.shared.dirty) { - debug!("Fragment::build_display_list: Did not intersect..."); - return - } - // Calculate the clip rect. If there's nothing to render at all, don't even construct // display list items. let clip = self.calculate_style_specified_clip(clip, &stacking_relative_border_box); diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 38653037f6b..690b95edfa9 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -119,9 +119,6 @@ pub struct LayoutTaskData { /// The workers that we use for parallel operation. pub parallel_traversal: Option>, - /// The dirty rect. Used during display list construction. - pub dirty: Rect, - /// Starts at zero, and increased by one every time a layout completes. /// This can be used to easily check for invalid stale data. pub generation: u32, @@ -377,7 +374,6 @@ impl LayoutTask { stacking_context: None, stylist: stylist, parallel_traversal: parallel_traversal, - dirty: Rect::zero(), generation: 0, content_box_response: Rect::zero(), content_boxes_response: Vec::new(), @@ -421,7 +417,6 @@ impl LayoutTask { stylist: &*rw_data.stylist, url: (*url).clone(), reflow_root: reflow_root.map(|node| node.opaque()), - dirty: Rect::zero(), visible_rects: rw_data.visible_rects.clone(), generation: rw_data.generation, new_animations_sender: rw_data.new_animations_sender.clone(), @@ -1005,9 +1000,6 @@ impl LayoutTask { self.profiler_metadata(), self.time_profiler_chan.clone(), || { - shared_layout_context.dirty = - flow::base(&**layout_root).position.to_physical(writing_mode, - rw_data.screen_size); flow::mut_base(&mut **layout_root).stacking_relative_position = LogicalPoint::zero(writing_mode).to_physical(writing_mode, rw_data.screen_size);