mirror of
https://github.com/servo/servo.git
synced 2025-06-23 08:34:42 +01:00
~[] to Vec in main/compositing/compositor_layer.rs
This commit is contained in:
parent
60d443da16
commit
7073f3b645
1 changed files with 5 additions and 5 deletions
|
@ -65,7 +65,7 @@ pub struct CompositorLayer {
|
|||
/// differs in scroll behavior from its parent. Each is associated with a
|
||||
/// ContainerLayer which determines its position relative to its parent and
|
||||
/// clipping rect. Children are stored in the order in which they are drawn.
|
||||
pub children: ~[CompositorLayerChild],
|
||||
pub children: Vec<CompositorLayerChild>,
|
||||
|
||||
/// This layer's quadtree. This is where all buffers are stored for this layer.
|
||||
pub quadtree: MaybeQuadtree,
|
||||
|
@ -170,7 +170,7 @@ impl CompositorLayer {
|
|||
bounds: bounds,
|
||||
page_size: page_size,
|
||||
scroll_offset: Point2D(0f32, 0f32),
|
||||
children: ~[],
|
||||
children: Vec::new(),
|
||||
quadtree: match page_size {
|
||||
None => NoTree(tile_size, Some(MAX_TILE_MEMORY_PER_LAYER)),
|
||||
Some(page_size) => {
|
||||
|
@ -203,7 +203,7 @@ impl CompositorLayer {
|
|||
bounds: Rect(Point2D(0f32, 0f32), page_size),
|
||||
page_size: Some(page_size),
|
||||
scroll_offset: Point2D(0f32, 0f32),
|
||||
children: ~[],
|
||||
children: Vec::new(),
|
||||
quadtree: NoTree(tile_size, Some(MAX_TILE_MEMORY_PER_LAYER)),
|
||||
root_layer: Rc::new(ContainerLayer()),
|
||||
hidden: false,
|
||||
|
@ -494,7 +494,7 @@ impl CompositorLayer {
|
|||
}) {
|
||||
Some(i) => {
|
||||
debug!("compositor_layer: node found for set_clipping_rect()");
|
||||
let child_node = &mut self.children[i];
|
||||
let child_node = self.children.get_mut(i);
|
||||
child_node.container.common.borrow_mut().set_transform(
|
||||
identity().translate(new_rect.origin.x, new_rect.origin.y, 0.0));
|
||||
let old_rect = child_node.container.scissor.borrow().clone();
|
||||
|
@ -649,7 +649,7 @@ impl CompositorLayer {
|
|||
}) {
|
||||
Some(i) => {
|
||||
debug!("compositor_layer: layer found for resize_helper()");
|
||||
let child_node = &mut self.children[i];
|
||||
let child_node = self.children.get_mut(i);
|
||||
let child = &mut child_node.child;
|
||||
child.epoch = epoch;
|
||||
child.page_size = Some(new_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue