mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove unused delete_layer code.
This commit is contained in:
parent
2b0134be7b
commit
81601c21aa
5 changed files with 1 additions and 63 deletions
|
@ -298,10 +298,6 @@ impl IOCompositor {
|
||||||
self.set_layer_clip_rect(pipeline_id, layer_id, new_rect);
|
self.set_layer_clip_rect(pipeline_id, layer_id, new_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
(Ok(DeleteLayerGroup(id)), _) => {
|
|
||||||
self.delete_layer(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
(Ok(Paint(pipeline_id, layer_id, new_layer_buffer_set, epoch)), false) => {
|
(Ok(Paint(pipeline_id, layer_id, new_layer_buffer_set, epoch)), false) => {
|
||||||
self.paint(pipeline_id, layer_id, new_layer_buffer_set, epoch);
|
self.paint(pipeline_id, layer_id, new_layer_buffer_set, epoch);
|
||||||
}
|
}
|
||||||
|
@ -474,22 +470,6 @@ impl IOCompositor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn delete_layer(&mut self, id: PipelineId) {
|
|
||||||
let ask: bool = match self.compositor_layer {
|
|
||||||
Some(ref mut layer) => {
|
|
||||||
assert!(layer.delete(&self.graphics_context, id));
|
|
||||||
true
|
|
||||||
}
|
|
||||||
None => {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if ask {
|
|
||||||
self.ask_for_tiles();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn paint(&mut self,
|
fn paint(&mut self,
|
||||||
pipeline_id: PipelineId,
|
pipeline_id: PipelineId,
|
||||||
layer_id: LayerId,
|
layer_id: LayerId,
|
||||||
|
|
|
@ -857,40 +857,6 @@ impl CompositorLayer {
|
||||||
return None
|
return None
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deletes a specified sublayer, including hidden children. Returns false if the layer is not
|
|
||||||
// found.
|
|
||||||
pub fn delete(&mut self,
|
|
||||||
graphics_context: &NativeCompositingGraphicsContext,
|
|
||||||
pipeline_id: PipelineId)
|
|
||||||
-> bool {
|
|
||||||
match self.children.iter().position(|x| x.child.pipeline.id == pipeline_id) {
|
|
||||||
Some(i) => {
|
|
||||||
let mut child = self.children.remove(i);
|
|
||||||
match self.quadtree {
|
|
||||||
NoTree(..) => {} // Nothing to do
|
|
||||||
Tree(ref mut quadtree) => {
|
|
||||||
match *child.get_ref().container.scissor.borrow() {
|
|
||||||
Some(rect) => {
|
|
||||||
quadtree.set_status_page(rect, Normal, false); // Unhide this rect
|
|
||||||
}
|
|
||||||
None => {} // Nothing to do
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send back all tiles to renderer.
|
|
||||||
child.get_mut_ref().child.clear_all_tiles();
|
|
||||||
|
|
||||||
self.build_layer_tree(graphics_context);
|
|
||||||
true
|
|
||||||
}
|
|
||||||
None => {
|
|
||||||
self.children.mut_iter().map(|x| &mut x.child)
|
|
||||||
.any(|x| x.delete(graphics_context, pipeline_id))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recursively sets occluded portions of quadtrees to Hidden, so that they do not ask for
|
// Recursively sets occluded portions of quadtrees to Hidden, so that they do not ask for
|
||||||
// tile requests. If layers are moved, resized, or deleted, these portions may be updated.
|
// tile requests. If layers are moved, resized, or deleted, these portions may be updated.
|
||||||
fn set_occlusions(&mut self) {
|
fn set_occlusions(&mut self) {
|
||||||
|
|
|
@ -126,10 +126,6 @@ impl RenderListener for CompositorChan {
|
||||||
self.chan.send(SetLayerClipRect(pipeline_id, layer_id, new_rect))
|
self.chan.send(SetLayerClipRect(pipeline_id, layer_id, new_rect))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn delete_layer_group(&self, id: PipelineId) {
|
|
||||||
self.chan.send(DeleteLayerGroup(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_render_state(&self, render_state: RenderState) {
|
fn set_render_state(&self, render_state: RenderState) {
|
||||||
self.chan.send(ChangeRenderState(render_state))
|
self.chan.send(ChangeRenderState(render_state))
|
||||||
}
|
}
|
||||||
|
@ -175,8 +171,6 @@ pub enum Msg {
|
||||||
SetLayerPageSize(PipelineId, LayerId, Size2D<f32>, Epoch),
|
SetLayerPageSize(PipelineId, LayerId, Size2D<f32>, Epoch),
|
||||||
/// Alerts the compositor that the specified layer's clipping rect has changed.
|
/// Alerts the compositor that the specified layer's clipping rect has changed.
|
||||||
SetLayerClipRect(PipelineId, LayerId, Rect<f32>),
|
SetLayerClipRect(PipelineId, LayerId, Rect<f32>),
|
||||||
/// Alerts the compositor that the specified pipeline has been deleted.
|
|
||||||
DeleteLayerGroup(PipelineId),
|
|
||||||
/// Scroll a page in a window
|
/// Scroll a page in a window
|
||||||
ScrollFragmentPoint(PipelineId, LayerId, Point2D<f32>),
|
ScrollFragmentPoint(PipelineId, LayerId, Point2D<f32>),
|
||||||
/// Requests that the compositor paint the given layer buffer set for the given page size.
|
/// Requests that the compositor paint the given layer buffer set for the given page size.
|
||||||
|
|
|
@ -78,7 +78,7 @@ impl NullCompositor {
|
||||||
|
|
||||||
CreateRootCompositorLayerIfNecessary(..) |
|
CreateRootCompositorLayerIfNecessary(..) |
|
||||||
CreateDescendantCompositorLayerIfNecessary(..) | SetLayerPageSize(..) |
|
CreateDescendantCompositorLayerIfNecessary(..) | SetLayerPageSize(..) |
|
||||||
SetLayerClipRect(..) | DeleteLayerGroup(..) | Paint(..) |
|
SetLayerClipRect(..) | Paint(..) |
|
||||||
ChangeReadyState(..) | ChangeRenderState(..) | ScrollFragmentPoint(..) |
|
ChangeReadyState(..) | ChangeRenderState(..) | ScrollFragmentPoint(..) |
|
||||||
SetUnRenderedColor(..) | LoadComplete(..) => ()
|
SetUnRenderedColor(..) | LoadComplete(..) => ()
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,8 +134,6 @@ pub trait RenderListener {
|
||||||
layer_id: LayerId,
|
layer_id: LayerId,
|
||||||
new_rect: Rect<uint>);
|
new_rect: Rect<uint>);
|
||||||
|
|
||||||
fn delete_layer_group(&self, PipelineId);
|
|
||||||
|
|
||||||
/// Sends new tiles for the given layer to the compositor.
|
/// Sends new tiles for the given layer to the compositor.
|
||||||
fn paint(&self,
|
fn paint(&self,
|
||||||
pipeline_id: PipelineId,
|
pipeline_id: PipelineId,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue