mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
layout: Switch display list building from bottom-up to top-down.
This eliminates a lot of allocations and O(n^2) behavior.
This commit is contained in:
parent
f4b95dd00b
commit
d3d2dd05f2
5 changed files with 35 additions and 58 deletions
|
@ -34,7 +34,7 @@ use floats::Floats;
|
|||
use flow_list::{FlowList, FlowListIterator, MutFlowListIterator};
|
||||
use flow_ref::{self, FlowRef, WeakFlowRef};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow, SpecificFragmentInfo};
|
||||
use gfx::display_list::{ClippingRegion, DisplayListEntry, StackingContext, StackingContextId};
|
||||
use gfx::display_list::{ClippingRegion, StackingContext, StackingContextId};
|
||||
use gfx_traits::{LayerId, LayerType};
|
||||
use incremental::{RECONSTRUCT_FLOW, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, RestyleDamage};
|
||||
use inline::InlineFlow;
|
||||
|
@ -957,9 +957,6 @@ pub struct BaseFlow {
|
|||
/// per-stacking-context.
|
||||
pub stacking_relative_position_of_display_port: Rect<Au>,
|
||||
|
||||
/// The results of display list building for this flow.
|
||||
pub display_list_building_result: Option<Vec<DisplayListEntry>>,
|
||||
|
||||
/// The writing mode for this flow.
|
||||
pub writing_mode: WritingMode,
|
||||
|
||||
|
@ -1129,7 +1126,6 @@ impl BaseFlow {
|
|||
block_container_writing_mode: writing_mode,
|
||||
block_container_explicit_block_size: None,
|
||||
absolute_cb: ContainingBlockLink::new(),
|
||||
display_list_building_result: None,
|
||||
early_absolute_position_info: EarlyAbsolutePositionInfo::new(writing_mode),
|
||||
late_absolute_position_info: LateAbsolutePositionInfo::new(),
|
||||
clip: ClippingRegion::max(),
|
||||
|
@ -1147,8 +1143,6 @@ impl BaseFlow {
|
|||
children: children,
|
||||
restyle_damage: self.restyle_damage | REPAINT | REFLOW_OUT_OF_FLOW | REFLOW,
|
||||
parallel: FlowParallelInfo::new(),
|
||||
display_list_building_result: None,
|
||||
|
||||
floats: self.floats.clone(),
|
||||
abs_descendants: self.abs_descendants.clone(),
|
||||
absolute_cb: self.absolute_cb.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue