aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/paint_thread.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2016-04-22 10:28:27 -0700
committerMartin Robinson <mrobinson@igalia.com>2016-04-22 10:28:27 -0700
commit05fb2ef6ee307f4e317430aa51a5692d7ba07b51 (patch)
treeee90ab4f8e5c3bd0b3a135a2e078d94696ff3946 /components/gfx/paint_thread.rs
parent3d4416e1b0ae758e68900f725979238cc0128f8b (diff)
downloadservo-05fb2ef6ee307f4e317430aa51a5692d7ba07b51.tar.gz
servo-05fb2ef6ee307f4e317430aa51a5692d7ba07b51.zip
Merge DisplayListEntry into DisplayItem
We don't really need two levels of abstraction for every element in the DisplayList. This simplifies the complexity of the data structure in preparation for providing documentation and properly handling scrolling roots.
Diffstat (limited to 'components/gfx/paint_thread.rs')
-rw-r--r--components/gfx/paint_thread.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs
index 2ea708d39fb..76c21eed484 100644
--- a/components/gfx/paint_thread.rs
+++ b/components/gfx/paint_thread.rs
@@ -7,7 +7,7 @@
use app_units::Au;
use azure::AzFloat;
use azure::azure_hl::{BackendType, Color, DrawTarget, SurfaceFormat};
-use display_list::{DisplayItem, DisplayList, DisplayListEntry, DisplayListTraversal};
+use display_list::{DisplayItem, DisplayList, DisplayListTraversal};
use display_list::{LayerInfo, StackingContext, StackingContextId, StackingContextType};
use euclid::Matrix4D;
use euclid::point::Point2D;
@@ -160,7 +160,7 @@ struct LayerCreator {
layers: Vec<PaintLayer>,
layer_details_stack: Vec<PaintLayer>,
current_layer: Option<PaintLayer>,
- current_entry_index: usize,
+ current_item_index: usize,
}
impl LayerCreator {
@@ -169,7 +169,7 @@ impl LayerCreator {
layers: Vec::new(),
layer_details_stack: Vec::new(),
current_layer: None,
- current_entry_index: 0,
+ current_item_index: 0,
};
let mut traversal = DisplayListTraversal {
display_list: display_list,
@@ -280,12 +280,12 @@ impl LayerCreator {
fn create_layers_for_item<'a>(&mut self,
- item: &DisplayListEntry,
+ item: &DisplayItem,
parent_origin: &Point2D<Au>,
transform: &Matrix4D<f32>,
perspective: &Matrix4D<f32>) {
- if let DisplayItem::LayeredItemClass(ref layered_item) = item.item {
- // We need to finalize the last layer here before incrementing the entry
+ if let &DisplayItem::LayeredItemClass(ref layered_item) = item {
+ // We need to finalize the last layer here before incrementing the item
// index, otherwise this item will be placed into the parent layer.
self.finalize_current_layer();
let layer = PaintLayer::new_for_display_item(
@@ -296,9 +296,9 @@ impl LayerCreator {
perspective,
self.current_parent_layer_id(),
self.current_parent_stacking_context_id(),
- self.current_entry_index);
+ self.current_item_index);
self.layers.push(layer);
- self.current_entry_index += 1;
+ self.current_item_index += 1;
return;
}
@@ -320,9 +320,9 @@ impl LayerCreator {
}
if let Some(ref mut current_layer) = self.current_layer {
- current_layer.add_item(self.current_entry_index);
+ current_layer.add_item(self.current_item_index);
}
- self.current_entry_index += 1;
+ self.current_item_index += 1;
}
}