mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Wait as late as possible to assign ClipIds
This will allow Servo to create ClipScrollNodes later during display list construction, which will be necessary once rounded rectangles are removed from the LocalClip structure. Instead of keeping track of the ClipId of each ClipScrollNode, we keep track of its index in an array of ClipScrollNodes. This will allow us to access them without a hash lookup.
This commit is contained in:
parent
a296e386af
commit
5937f62352
8 changed files with 365 additions and 274 deletions
|
@ -313,9 +313,8 @@ impl<'a> BuildDisplayList<'a> {
|
|||
let parent_stacking_context_id = self.state.current_stacking_context_id;
|
||||
self.state.current_stacking_context_id = flow::base(flow).stacking_context_id;
|
||||
|
||||
let parent_clip_and_scroll_info = self.state.current_clip_and_scroll_info;
|
||||
self.state.current_clip_and_scroll_info =
|
||||
flow.clip_and_scroll_info(self.state.layout_context.id);
|
||||
let parent_clipping_and_scrolling = self.state.current_clipping_and_scrolling;
|
||||
self.state.current_clipping_and_scrolling = flow.clipping_and_scrolling();
|
||||
|
||||
flow.build_display_list(&mut self.state);
|
||||
flow::mut_base(flow).restyle_damage.remove(REPAINT);
|
||||
|
@ -325,6 +324,6 @@ impl<'a> BuildDisplayList<'a> {
|
|||
}
|
||||
|
||||
self.state.current_stacking_context_id = parent_stacking_context_id;
|
||||
self.state.current_clip_and_scroll_info = parent_clip_and_scroll_info;
|
||||
self.state.current_clipping_and_scrolling = parent_clipping_and_scrolling;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue