Rename paint_task::Msg variants.

This commit is contained in:
Ms2ger 2015-01-04 11:06:07 +01:00
parent dd84ae6bfb
commit d5cc791d31
5 changed files with 23 additions and 21 deletions

View file

@ -18,7 +18,8 @@ use geom::point::{Point2D, TypedPoint2D};
use geom::rect::{Rect, TypedRect};
use geom::size::TypedSize2D;
use geom::scale_factor::ScaleFactor;
use gfx::paint_task::{PaintChan, PaintMsg, PaintRequest, UnusedBufferMsg};
use gfx::paint_task::Msg as PaintMsg;
use gfx::paint_task::{PaintChan, PaintRequest};
use layers::geometry::{DevicePixel, LayerPixel};
use layers::layers::{BufferRequest, Layer, LayerBufferSet};
use layers::rendergl;
@ -662,7 +663,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
None => {
match self.paint_channels.entry(pipeline_id) {
Occupied(entry) => {
let message = UnusedBufferMsg(new_layer_buffer_set.buffers);
let message = PaintMsg::UnusedBuffer(new_layer_buffer_set.buffers);
let _ = entry.get().send_opt(message);
},
Vacant(_) => panic!("Received a buffer from an unknown pipeline!"),
@ -962,7 +963,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
Some(ref pipeline) => {
let unused_buffers = self.scene.collect_unused_buffers();
if unused_buffers.len() != 0 {
let message = UnusedBufferMsg(unused_buffers);
let message = PaintMsg::UnusedBuffer(unused_buffers);
let _ = pipeline.paint_chan.send_opt(message);
}
},
@ -1012,7 +1013,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let mut num_paint_msgs_sent = 0;
for (_pipeline_id, (chan, requests)) in pipeline_requests.into_iter() {
num_paint_msgs_sent += 1;
let _ = chan.send_opt(PaintMsg(requests));
let _ = chan.send_opt(PaintMsg::Paint(requests));
}
self.add_outstanding_paint_msg(num_paint_msgs_sent);

View file

@ -12,7 +12,7 @@ use geom::matrix::identity;
use geom::point::{Point2D, TypedPoint2D};
use geom::size::TypedSize2D;
use geom::rect::Rect;
use gfx::paint_task::UnusedBufferMsg;
use gfx::paint_task::Msg as PaintMsg;
use layers::color::Color;
use layers::geometry::LayerPixel;
use layers::layers::{Layer, LayerBufferSet};
@ -196,7 +196,7 @@ impl CompositorLayer for Layer<CompositorData> {
self.extra_data.borrow().epoch,
epoch,
self.extra_data.borrow().pipeline.id);
let msg = UnusedBufferMsg(new_buffers.buffers);
let msg = PaintMsg::UnusedBuffer(new_buffers.buffers);
let _ = self.extra_data.borrow().pipeline.paint_chan.send_opt(msg);
return false;
}
@ -208,7 +208,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 msg = PaintMsg::UnusedBuffer(unused_buffers);
let _ = self.extra_data.borrow().pipeline.paint_chan.send_opt(msg);
}
}
@ -227,7 +227,7 @@ impl CompositorLayer for Layer<CompositorData> {
buffer.mark_wont_leak()
}
let _ = self.extra_data.borrow().pipeline.paint_chan.send_opt(UnusedBufferMsg(buffers));
let _ = self.extra_data.borrow().pipeline.paint_chan.send_opt(PaintMsg::UnusedBuffer(buffers));
}
}

View file

@ -8,7 +8,7 @@ use script_traits::{ScriptControlChan, ScriptTaskFactory};
use script_traits::{AttachLayoutMsg, LoadMsg, NewLayoutInfo, ExitPipelineMsg};
use devtools_traits::DevtoolsControlChan;
use gfx::paint_task;
use gfx::paint_task::Msg as PaintMsg;
use gfx::paint_task::{PaintPermissionGranted, PaintPermissionRevoked};
use gfx::paint_task::{PaintChan, PaintTask};
use servo_msg::constellation_msg::{ConstellationChan, ExitMsg, Failure, PipelineId, SubpageId};
@ -192,7 +192,7 @@ impl Pipeline {
pub fn force_exit(&self) {
let ScriptControlChan(ref script_channel) = self.script_chan;
let _ = script_channel.send_opt( ExitPipelineMsg(self.id, PipelineExitType::PipelineOnly));
let _ = self.paint_chan.send_opt(paint_task::ExitMsg(None, PipelineExitType::PipelineOnly));
let _ = self.paint_chan.send_opt(PaintMsg::Exit(None, PipelineExitType::PipelineOnly));
let LayoutControlChan(ref layout_channel) = self.layout_chan;
let _ = layout_channel.send_opt(ExitNowMsg(PipelineExitType::PipelineOnly));
}