mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Remove pointless layer lookup
We just created the root layer, so there's no point in trying to find it again.
This commit is contained in:
parent
c0b599f894
commit
568d4d568a
1 changed files with 5 additions and 16 deletions
|
@ -394,7 +394,6 @@ impl IOCompositor {
|
||||||
};
|
};
|
||||||
|
|
||||||
if layer_id != root_layer_id {
|
if layer_id != root_layer_id {
|
||||||
let root_pipeline_id = root_pipeline.id;
|
|
||||||
let new_compositor_data = CompositorData::new_root(root_pipeline,
|
let new_compositor_data = CompositorData::new_root(root_pipeline,
|
||||||
size,
|
size,
|
||||||
self.opts.cpu_painting);
|
self.opts.cpu_painting);
|
||||||
|
@ -403,21 +402,11 @@ impl IOCompositor {
|
||||||
new_compositor_data));
|
new_compositor_data));
|
||||||
new_root.extra_data.borrow_mut().unrendered_color = unrendered_color;
|
new_root.extra_data.borrow_mut().unrendered_color = unrendered_color;
|
||||||
|
|
||||||
let parent_layer_id = new_root.extra_data.borrow().id;
|
CompositorData::add_child_if_necessary(new_root.clone(),
|
||||||
match CompositorData::find_layer_with_layer_and_pipeline_id(new_root.clone(),
|
|
||||||
root_pipeline_id,
|
|
||||||
parent_layer_id) {
|
|
||||||
Some(ref mut parent_layer) => {
|
|
||||||
CompositorData::add_child_if_necessary(parent_layer.clone(),
|
|
||||||
layer_id,
|
layer_id,
|
||||||
Rect(Point2D(0f32, 0f32), size),
|
Rect(Point2D(0f32, 0f32), size),
|
||||||
size,
|
size,
|
||||||
Scrollable);
|
Scrollable);
|
||||||
}
|
|
||||||
None => {
|
|
||||||
fail!("Compositor: couldn't find parent layer");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release all tiles from the layer before dropping it.
|
// Release all tiles from the layer before dropping it.
|
||||||
match self.scene.root {
|
match self.scene.root {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue