diff options
Diffstat (limited to 'components/compositing')
-rw-r--r-- | components/compositing/compositor.rs | 8 | ||||
-rw-r--r-- | components/compositing/compositor_layer.rs | 12 | ||||
-rw-r--r-- | components/compositing/compositor_task.rs | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index f039d7bee27..923324d1f3a 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -885,7 +885,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { let url = Url::parse(&url_string).unwrap(); self.window.set_page_url(url.clone()); let msg = match self.scene.root { - Some(ref layer) => ConstellationMsg::LoadUrl(layer.get_pipeline_id(), LoadData::new(url)), + Some(ref layer) => ConstellationMsg::LoadUrl(layer.pipeline_id(), LoadData::new(url)), None => ConstellationMsg::InitLoadUrl(url) }; @@ -1117,7 +1117,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { let mut results: HashMap<PipelineId, Vec<PaintRequest>> = HashMap::new(); for (layer, mut layer_requests) in requests.into_iter() { - let pipeline_id = layer.get_pipeline_id(); + let pipeline_id = layer.pipeline_id(); let current_epoch = self.pipeline_details.get(&pipeline_id).unwrap().current_epoch; layer.extra_data.borrow_mut().requested_epoch = current_epoch; let vec = match results.entry(pipeline_id) { @@ -1151,7 +1151,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { Vec<Box<LayerBuffer>>)>) { for (layer, buffers) in unused_buffers.into_iter() { if !buffers.is_empty() { - let pipeline = self.get_pipeline(layer.get_pipeline_id()); + let pipeline = self.get_pipeline(layer.pipeline_id()); let _ = pipeline.paint_chan.send_opt(PaintMsg::UnusedBuffer(buffers)); } } @@ -1161,7 +1161,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { if layer.extra_data.borrow().id == LayerId::null() { let layer_rect = Rect(-layer.extra_data.borrow().scroll_offset.to_untyped(), layer.bounds.borrow().size.to_untyped()); - let pipeline = self.get_pipeline(layer.get_pipeline_id()); + let pipeline = self.get_pipeline(layer.pipeline_id()); let ScriptControlChan(ref chan) = pipeline.script_chan; chan.send(ConstellationControlMsg::Viewport(pipeline.id.clone(), layer_rect)).unwrap(); } diff --git a/components/compositing/compositor_layer.rs b/components/compositing/compositor_layer.rs index 0a37340c4f9..240923410ad 100644 --- a/components/compositing/compositor_layer.rs +++ b/components/compositing/compositor_layer.rs @@ -141,7 +141,7 @@ pub trait CompositorLayer { fn wants_scroll_events(&self) -> WantsScrollEventsFlag; /// Return the pipeline id associated with this layer. - fn get_pipeline_id(&self) -> PipelineId; + fn pipeline_id(&self) -> PipelineId; } #[derive(Copy, PartialEq, Clone)] @@ -225,7 +225,7 @@ impl CompositorLayer for Layer<CompositorData> { let unused_buffers = self.collect_unused_buffers(); if !unused_buffers.is_empty() { // send back unused buffers - let pipeline = compositor.get_pipeline(self.get_pipeline_id()); + let pipeline = compositor.get_pipeline(self.pipeline_id()); let _ = pipeline.paint_chan.send(PaintMsg::UnusedBuffer(unused_buffers)); } } @@ -241,7 +241,7 @@ impl CompositorLayer for Layer<CompositorData> { buffer.mark_wont_leak() } - let pipeline = compositor.get_pipeline(self.get_pipeline_id()); + let pipeline = compositor.get_pipeline(self.pipeline_id()); let _ = pipeline.paint_chan.send(PaintMsg::UnusedBuffer(buffers)); } } @@ -370,7 +370,7 @@ impl CompositorLayer for Layer<CompositorData> { MouseUpEvent(button, event_point), }; - let pipeline = compositor.get_pipeline(self.get_pipeline_id()); + let pipeline = compositor.get_pipeline(self.pipeline_id()); let ScriptControlChan(ref chan) = pipeline.script_chan; let _ = chan.send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), message)); } @@ -380,7 +380,7 @@ impl CompositorLayer for Layer<CompositorData> { cursor: TypedPoint2D<LayerPixel, f32>) where Window: WindowMethods { let message = MouseMoveEvent(cursor.to_untyped()); - let pipeline = compositor.get_pipeline(self.get_pipeline_id()); + let pipeline = compositor.get_pipeline(self.pipeline_id()); let ScriptControlChan(ref chan) = pipeline.script_chan; let _ = chan.send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), message)); } @@ -409,7 +409,7 @@ impl CompositorLayer for Layer<CompositorData> { self.extra_data.borrow().wants_scroll_events } - fn get_pipeline_id(&self) -> PipelineId { + fn pipeline_id(&self) -> PipelineId { self.extra_data.borrow().pipeline_id } } diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs index 9a47fce1600..be134d751bc 100644 --- a/components/compositing/compositor_task.rs +++ b/components/compositing/compositor_task.rs @@ -91,7 +91,7 @@ impl ScriptListener for Box<CompositorProxy+'static+Send> { /// Implementation of the abstract `PaintListener` interface. impl PaintListener for Box<CompositorProxy+'static+Send> { - fn get_graphics_metadata(&mut self) -> Option<NativeGraphicsMetadata> { + fn graphics_metadata(&mut self) -> Option<NativeGraphicsMetadata> { let (chan, port) = channel(); self.send(Msg::GetGraphicsMetadata(chan)); // If the compositor is shutting down when a paint task |