Rename RenderChan -> PaintChan

This commit is contained in:
Tetsuharu OHZEKI 2014-12-08 03:58:58 +09:00
parent 9b6faaf7f0
commit 7ff790d941
7 changed files with 38 additions and 38 deletions

View file

@ -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<Window: WindowMethods> IOCompositor<Window> {
fn convert_buffer_requests_to_pipeline_requests_map(&self,
requests: Vec<(Rc<Layer<CompositorData>>,
Vec<BufferRequest>)>) ->
HashMap<PipelineId, (RenderChan,
HashMap<PipelineId, (PaintChan,
Vec<PaintRequest>)> {
let scale = self.device_pixels_per_page_px();
let mut results:
HashMap<PipelineId, (RenderChan, Vec<PaintRequest>)> = HashMap::new();
HashMap<PipelineId, (PaintChan, Vec<PaintRequest>)> = 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<Window: WindowMethods> IOCompositor<Window> {
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 => {}

View file

@ -194,7 +194,7 @@ impl CompositorLayer for Layer<CompositorData> {
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<CompositorData> {
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<CompositorData> {
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));
}
}

View file

@ -506,7 +506,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
fn force_pipeline_exit(old_pipeline: &Rc<Pipeline>) {
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);
}

View file

@ -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<SubpageId>,
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<SubpageId>,
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(),
}
}
}