diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 8c9edd8ab36..1d1007e3ec3 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -29,7 +29,7 @@ use geom::point::{Point2D, TypedPoint2D}; use geom::rect::{Rect, TypedRect}; use geom::size::TypedSize2D; use geom::scale_factor::ScaleFactor; -use gfx::paint_task::{RenderChan, RenderMsg, PaintRequest, UnusedBufferMsg}; +use gfx::paint_task::{PaintChan, RenderMsg, PaintRequest, UnusedBufferMsg}; use layers::geometry::{DevicePixel, LayerPixel}; use layers::layers::{BufferRequest, Layer, LayerBufferSet}; use layers::rendergl; @@ -837,22 +837,22 @@ impl IOCompositor { fn convert_buffer_requests_to_pipeline_requests_map(&self, requests: Vec<(Rc>, Vec)>) -> - HashMap)> { let scale = self.device_pixels_per_page_px(); let mut results: - HashMap)> = HashMap::new(); + HashMap)> = HashMap::new(); for (layer, mut layer_requests) in requests.into_iter() { let &(_, ref mut vec) = match results.entry(layer.extra_data.borrow().pipeline.id) { Occupied(mut entry) => { *entry.get_mut() = - (layer.extra_data.borrow().pipeline.render_chan.clone(), vec!()); + (layer.extra_data.borrow().pipeline.paint_chan.clone(), vec!()); entry.into_mut() } Vacant(entry) => { - entry.set((layer.extra_data.borrow().pipeline.render_chan.clone(), vec!())) + entry.set((layer.extra_data.borrow().pipeline.paint_chan.clone(), vec!())) } }; @@ -879,7 +879,7 @@ impl IOCompositor { let unused_buffers = self.scene.collect_unused_buffers(); if unused_buffers.len() != 0 { let message = UnusedBufferMsg(unused_buffers); - let _ = pipeline.render_chan.send_opt(message); + let _ = pipeline.paint_chan.send_opt(message); } }, None => {} diff --git a/components/compositing/compositor_layer.rs b/components/compositing/compositor_layer.rs index 6e570f69f62..38b9aea80dc 100644 --- a/components/compositing/compositor_layer.rs +++ b/components/compositing/compositor_layer.rs @@ -194,7 +194,7 @@ impl CompositorLayer for Layer { epoch, self.extra_data.borrow().pipeline.id); let msg = UnusedBufferMsg(new_buffers.buffers); - let _ = self.extra_data.borrow().pipeline.render_chan.send_opt(msg); + let _ = self.extra_data.borrow().pipeline.paint_chan.send_opt(msg); return false; } @@ -206,7 +206,7 @@ impl CompositorLayer for Layer { let unused_buffers = self.collect_unused_buffers(); if !unused_buffers.is_empty() { // send back unused buffers let msg = UnusedBufferMsg(unused_buffers); - let _ = self.extra_data.borrow().pipeline.render_chan.send_opt(msg); + let _ = self.extra_data.borrow().pipeline.paint_chan.send_opt(msg); } } @@ -224,7 +224,7 @@ impl CompositorLayer for Layer { buffer.mark_wont_leak() } - let _ = self.extra_data.borrow().pipeline.render_chan.send_opt(UnusedBufferMsg(buffers)); + let _ = self.extra_data.borrow().pipeline.paint_chan.send_opt(UnusedBufferMsg(buffers)); } } diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index d2b8cf9892c..79f0283b54c 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -506,7 +506,7 @@ impl Constellation { fn force_pipeline_exit(old_pipeline: &Rc) { let ScriptControlChan(ref old_script) = old_pipeline.script_chan; let _ = old_script.send_opt(ExitPipelineMsg(old_pipeline.id)); - let _ = old_pipeline.render_chan.send_opt(paint_task::ExitMsg(None)); + let _ = old_pipeline.paint_chan.send_opt(paint_task::ExitMsg(None)); let LayoutControlChan(ref old_layout) = old_pipeline.layout_chan; let _ = old_layout.send_opt(ExitNowMsg); } diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index 51632ab9820..1f382c42a9d 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -9,7 +9,7 @@ use script_traits::{AttachLayoutMsg, LoadMsg, NewLayoutInfo, ExitPipelineMsg}; use devtools_traits::DevtoolsControlChan; use gfx::paint_task::{PaintPermissionGranted, PaintPermissionRevoked}; -use gfx::paint_task::{RenderChan, PaintTask}; +use gfx::paint_task::{PaintChan, PaintTask}; use servo_msg::constellation_msg::{ConstellationChan, Failure, PipelineId, SubpageId}; use servo_msg::constellation_msg::{LoadData, WindowSizeData}; use servo_net::image_cache_task::ImageCacheTask; @@ -25,7 +25,7 @@ pub struct Pipeline { pub subpage_id: Option, pub script_chan: ScriptControlChan, pub layout_chan: LayoutControlChan, - pub render_chan: RenderChan, + pub paint_chan: PaintChan, pub layout_shutdown_port: Receiver<()>, pub render_shutdown_port: Receiver<()>, /// The most recently loaded page @@ -37,7 +37,7 @@ pub struct Pipeline { pub struct CompositionPipeline { pub id: PipelineId, pub script_chan: ScriptControlChan, - pub render_chan: RenderChan, + pub paint_chan: PaintChan, } impl Pipeline { @@ -60,7 +60,7 @@ impl Pipeline { load_data: LoadData) -> Pipeline { let layout_pair = ScriptTaskFactory::create_layout_channel(None::<&mut STF>); - let (render_port, render_chan) = RenderChan::new(); + let (render_port, paint_chan) = PaintChan::new(); let (render_shutdown_chan, render_shutdown_port) = channel(); let (layout_shutdown_chan, layout_shutdown_port) = channel(); let (pipeline_chan, pipeline_port) = channel(); @@ -118,7 +118,7 @@ impl Pipeline { constellation_chan, failure, script_chan.clone(), - render_chan.clone(), + paint_chan.clone(), resource_task, image_cache_task, font_cache_task, @@ -129,7 +129,7 @@ impl Pipeline { subpage_id, script_chan, LayoutControlChan(pipeline_chan), - render_chan, + paint_chan, layout_shutdown_port, render_shutdown_port, load_data) @@ -139,7 +139,7 @@ impl Pipeline { subpage_id: Option, script_chan: ScriptControlChan, layout_chan: LayoutControlChan, - render_chan: RenderChan, + paint_chan: PaintChan, layout_shutdown_port: Receiver<()>, render_shutdown_port: Receiver<()>, load_data: LoadData) @@ -149,7 +149,7 @@ impl Pipeline { subpage_id: subpage_id, script_chan: script_chan, layout_chan: layout_chan, - render_chan: render_chan, + paint_chan: paint_chan, layout_shutdown_port: layout_shutdown_port, render_shutdown_port: render_shutdown_port, load_data: load_data, @@ -162,12 +162,12 @@ impl Pipeline { } pub fn grant_paint_permission(&self) { - let _ = self.render_chan.send_opt(PaintPermissionGranted); + let _ = self.paint_chan.send_opt(PaintPermissionGranted); } pub fn revoke_paint_permission(&self) { debug!("pipeline revoking render channel paint permission"); - let _ = self.render_chan.send_opt(PaintPermissionRevoked); + let _ = self.paint_chan.send_opt(PaintPermissionRevoked); } pub fn exit(&self) { @@ -188,7 +188,7 @@ impl Pipeline { CompositionPipeline { id: self.id.clone(), script_chan: self.script_chan.clone(), - render_chan: self.render_chan.clone(), + paint_chan: self.paint_chan.clone(), } } } diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs index e3e21b46965..cbcbd7b3ea8 100644 --- a/components/gfx/paint_task.rs +++ b/components/gfx/paint_task.rs @@ -77,21 +77,21 @@ pub enum Msg { } #[deriving(Clone)] -pub struct RenderChan(Sender); +pub struct PaintChan(Sender); -impl RenderChan { - pub fn new() -> (Receiver, RenderChan) { +impl PaintChan { + pub fn new() -> (Receiver, PaintChan) { let (chan, port) = channel(); - (port, RenderChan(chan)) + (port, PaintChan(chan)) } pub fn send(&self, msg: Msg) { - let &RenderChan(ref chan) = self; - assert!(chan.send_opt(msg).is_ok(), "RenderChan.send: render port closed") + let &PaintChan(ref chan) = self; + assert!(chan.send_opt(msg).is_ok(), "PaintChan.send: render port closed") } pub fn send_opt(&self, msg: Msg) -> Result<(), Msg> { - let &RenderChan(ref chan) = self; + let &PaintChan(ref chan) = self; chan.send_opt(msg) } } diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 058bd6e14ad..2abab9d2894 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -28,7 +28,7 @@ use geom::scale_factor::ScaleFactor; use gfx::color; use gfx::display_list::{DisplayList, OpaqueNode, StackingContext}; use gfx::font_cache_task::FontCacheTask; -use gfx::paint_task::{mod, RenderInitMsg, RenderChan, PaintLayer}; +use gfx::paint_task::{mod, RenderInitMsg, PaintChan, PaintLayer}; use layout_traits; use layout_traits::{LayoutControlMsg, LayoutTaskFactory}; use log; @@ -119,7 +119,7 @@ pub struct LayoutTask { pub script_chan: ScriptControlChan, /// The channel on which messages can be sent to the painting task. - pub render_chan: RenderChan, + pub paint_chan: PaintChan, /// The channel on which messages can be sent to the time profiler. pub time_profiler_chan: TimeProfilerChan, @@ -173,7 +173,7 @@ impl LayoutTaskFactory for LayoutTask { constellation_chan: ConstellationChan, failure_msg: Failure, script_chan: ScriptControlChan, - render_chan: RenderChan, + paint_chan: PaintChan, resource_task: ResourceTask, img_cache_task: ImageCacheTask, font_cache_task: FontCacheTask, @@ -191,7 +191,7 @@ impl LayoutTaskFactory for LayoutTask { pipeline_port, constellation_chan, script_chan, - render_chan, + paint_chan, resource_task, img_cache_task, font_cache_task, @@ -240,7 +240,7 @@ impl LayoutTask { pipeline_port: Receiver, constellation_chan: ConstellationChan, script_chan: ScriptControlChan, - render_chan: RenderChan, + paint_chan: PaintChan, resource_task: ResourceTask, image_cache_task: ImageCacheTask, font_cache_task: FontCacheTask, @@ -264,7 +264,7 @@ impl LayoutTask { chan: chan, constellation_chan: constellation_chan, script_chan: script_chan, - render_chan: render_chan, + paint_chan: paint_chan, time_profiler_chan: time_profiler_chan, resource_task: resource_task, image_cache_task: image_cache_task.clone(), @@ -463,7 +463,7 @@ impl LayoutTask { LayoutTask::return_rw_data(possibly_locked_rw_data, rw_data); } - self.render_chan.send(paint_task::ExitMsg(Some(response_chan))); + self.paint_chan.send(paint_task::ExitMsg(Some(response_chan))); response_port.recv() } @@ -690,7 +690,7 @@ impl LayoutTask { debug!("Layout done!"); - self.render_chan.send(RenderInitMsg(stacking_context)); + self.paint_chan.send(RenderInitMsg(stacking_context)); }); } diff --git a/components/layout_traits/lib.rs b/components/layout_traits/lib.rs index d08de4cc01c..229791ff928 100644 --- a/components/layout_traits/lib.rs +++ b/components/layout_traits/lib.rs @@ -20,7 +20,7 @@ extern crate "util" as servo_util; // that these modules won't have to depend on layout. use gfx::font_cache_task::FontCacheTask; -use gfx::paint_task::RenderChan; +use gfx::paint_task::PaintChan; use servo_msg::constellation_msg::{ConstellationChan, PipelineId}; use servo_msg::constellation_msg::Failure; use servo_net::image_cache_task::ImageCacheTask; @@ -48,7 +48,7 @@ pub trait LayoutTaskFactory { constellation_chan: ConstellationChan, failure_msg: Failure, script_chan: ScriptControlChan, - render_chan: RenderChan, + paint_chan: PaintChan, resource_task: ResourceTask, img_cache_task: ImageCacheTask, font_cache_task: FontCacheTask,