diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index 118d2424094..51632ab9820 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, RenderTask}; +use gfx::paint_task::{RenderChan, PaintTask}; use servo_msg::constellation_msg::{ConstellationChan, Failure, PipelineId, SubpageId}; use servo_msg::constellation_msg::{LoadData, WindowSizeData}; use servo_net::image_cache_task::ImageCacheTask; @@ -102,14 +102,14 @@ impl Pipeline { } }; - RenderTask::create(id, - render_port, - compositor_proxy, - constellation_chan.clone(), - font_cache_task.clone(), - failure.clone(), - time_profiler_chan.clone(), - render_shutdown_chan); + PaintTask::create(id, + render_port, + compositor_proxy, + constellation_chan.clone(), + font_cache_task.clone(), + failure.clone(), + time_profiler_chan.clone(), + render_shutdown_chan); LayoutTaskFactory::create(None::<&mut LTF>, id, diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs index 6013fc8f936..dc4aa560911 100644 --- a/components/gfx/paint_task.rs +++ b/components/gfx/paint_task.rs @@ -96,7 +96,7 @@ impl RenderChan { } } -pub struct RenderTask { +pub struct PaintTask { id: PipelineId, port: Receiver, compositor: C, @@ -125,7 +125,7 @@ pub struct RenderTask { } // If we implement this as a function, we get borrowck errors from borrowing -// the whole RenderTask struct. +// the whole PaintTask struct. macro_rules! native_graphics_context( ($task:expr) => ( $task.native_graphics_context.as_ref().expect("Need a graphics context to do rendering") @@ -167,7 +167,7 @@ fn initialize_layers(compositor: &mut C, } } -impl RenderTask where C: RenderListener + Send { +impl PaintTask where C: RenderListener + Send { pub fn create(id: PipelineId, port: Receiver, compositor: C, @@ -177,7 +177,7 @@ impl RenderTask where C: RenderListener + Send { time_profiler_chan: TimeProfilerChan, shutdown_chan: Sender<()>) { let ConstellationChan(c) = constellation_chan.clone(); - spawn_named_with_send_on_failure("RenderTask", task_state::RENDER, proc() { + spawn_named_with_send_on_failure("PaintTask", task_state::RENDER, proc() { { // Ensures that the render task and graphics context are destroyed before the // shutdown message. @@ -189,7 +189,7 @@ impl RenderTask where C: RenderListener + Send { time_profiler_chan.clone()); // FIXME: rust/#5967 - let mut render_task = RenderTask { + let mut paint_task = PaintTask { id: id, port: port, compositor: compositor, @@ -203,27 +203,27 @@ impl RenderTask where C: RenderListener + Send { worker_threads: worker_threads, }; - render_task.start(); + paint_task.start(); // Destroy all the buffers. - match render_task.native_graphics_context.as_ref() { - Some(ctx) => render_task.buffer_map.clear(ctx), + match paint_task.native_graphics_context.as_ref() { + Some(ctx) => paint_task.buffer_map.clear(ctx), None => (), } // Tell all the worker threads to shut down. - for worker_thread in render_task.worker_threads.iter_mut() { + for worker_thread in paint_task.worker_threads.iter_mut() { worker_thread.exit() } } - debug!("render_task: shutdown_chan send"); + debug!("paint_task: shutdown_chan send"); shutdown_chan.send(()); }, FailureMsg(failure_msg), c, true); } fn start(&mut self) { - debug!("render_task: beginning rendering loop"); + debug!("paint_task: beginning rendering loop"); loop { match self.port.recv() { @@ -232,7 +232,7 @@ impl RenderTask where C: RenderListener + Send { self.root_stacking_context = Some(stacking_context.clone()); if !self.paint_permission { - debug!("render_task: render ready msg"); + debug!("paint_task: render ready msg"); let ConstellationChan(ref mut c) = self.constellation_chan; c.send(RendererReadyMsg(self.id)); continue; @@ -245,7 +245,7 @@ impl RenderTask where C: RenderListener + Send { } RenderMsg(requests) => { if !self.paint_permission { - debug!("render_task: render ready msg"); + debug!("paint_task: render ready msg"); let ConstellationChan(ref mut c) = self.constellation_chan; c.send(RendererReadyMsg(self.id)); self.compositor.render_msg_discarded(); @@ -265,7 +265,7 @@ impl RenderTask where C: RenderListener + Send { self.compositor.set_render_state(self.id, IdleRenderState); - debug!("render_task: returning surfaces"); + debug!("paint_task: returning surfaces"); self.compositor.paint(self.id, self.epoch, replies); } UnusedBufferMsg(unused_buffers) => { @@ -291,7 +291,7 @@ impl RenderTask where C: RenderListener + Send { self.paint_permission = false; } ExitMsg(response_ch) => { - debug!("render_task: exitmsg response send"); + debug!("paint_task: exitmsg response send"); response_ch.map(|ch| ch.send(())); break; }