aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/compositing/compositor.rs9
-rw-r--r--components/compositing/compositor_layer.rs8
-rw-r--r--components/compositing/pipeline.rs4
-rw-r--r--components/gfx/paint_task.rs16
-rw-r--r--components/layout/layout_task.rs7
5 files changed, 23 insertions, 21 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index ada75f62540..a13b75a4ad2 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -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);
diff --git a/components/compositing/compositor_layer.rs b/components/compositing/compositor_layer.rs
index 4fa7fc54437..9830d66381b 100644
--- a/components/compositing/compositor_layer.rs
+++ b/components/compositing/compositor_layer.rs
@@ -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));
}
}
diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs
index e90bf221e1d..822fc0c51e6 100644
--- a/components/compositing/pipeline.rs
+++ b/components/compositing/pipeline.rs
@@ -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));
}
diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs
index 676e0ec5d6b..747de7ef44c 100644
--- a/components/gfx/paint_task.rs
+++ b/components/gfx/paint_task.rs
@@ -68,12 +68,12 @@ pub struct PaintRequest {
}
pub enum Msg {
- PaintInitMsg(Arc<StackingContext>),
- PaintMsg(Vec<PaintRequest>),
- UnusedBufferMsg(Vec<Box<LayerBuffer>>),
+ PaintInit(Arc<StackingContext>),
+ Paint(Vec<PaintRequest>),
+ UnusedBuffer(Vec<Box<LayerBuffer>>),
PaintPermissionGranted,
PaintPermissionRevoked,
- ExitMsg(Option<Sender<()>>, PipelineExitType),
+ Exit(Option<Sender<()>>, PipelineExitType),
}
#[deriving(Clone)]
@@ -234,7 +234,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
let mut waiting_for_compositor_buffers_to_exit = false;
loop {
match self.port.recv() {
- Msg::PaintInitMsg(stacking_context) => {
+ Msg::PaintInit(stacking_context) => {
self.epoch.next();
self.root_stacking_context = Some(stacking_context.clone());
@@ -250,7 +250,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
self.epoch,
&*stacking_context);
}
- Msg::PaintMsg(requests) => {
+ Msg::Paint(requests) => {
if !self.paint_permission {
debug!("PaintTask: paint ready msg");
let ConstellationChan(ref mut c) = self.constellation_chan;
@@ -280,7 +280,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
debug!("PaintTask: returning surfaces");
self.compositor.paint(self.id, self.epoch, replies);
}
- Msg::UnusedBufferMsg(unused_buffers) => {
+ Msg::UnusedBuffer(unused_buffers) => {
debug!("PaintTask: Received {} unused buffers", unused_buffers.len());
self.used_buffer_count -= unused_buffers.len();
@@ -311,7 +311,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send {
Msg::PaintPermissionRevoked => {
self.paint_permission = false;
}
- Msg::ExitMsg(response_channel, exit_type) => {
+ Msg::Exit(response_channel, exit_type) => {
let should_wait_for_compositor_buffers = match exit_type {
PipelineExitType::Complete => false,
PipelineExitType::PipelineOnly => self.used_buffer_count != 0
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 596ba2a24c2..3cb4b9d5e31 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -28,7 +28,8 @@ use gfx::color;
use gfx::display_list::{ClippingRegion, DisplayItemMetadata, DisplayList, OpaqueNode};
use gfx::display_list::{StackingContext};
use gfx::font_cache_task::FontCacheTask;
-use gfx::paint_task::{mod, PaintInitMsg, PaintChan, PaintLayer};
+use gfx::paint_task::{PaintChan, PaintLayer};
+use gfx::paint_task::Msg as PaintMsg;
use layout_traits::{mod, LayoutControlMsg, LayoutTaskFactory};
use log;
use script::dom::bindings::js::JS;
@@ -464,7 +465,7 @@ impl LayoutTask {
LayoutTask::return_rw_data(possibly_locked_rw_data, rw_data);
}
- self.paint_chan.send(paint_task::ExitMsg(Some(response_chan), exit_type));
+ self.paint_chan.send(PaintMsg::Exit(Some(response_chan), exit_type));
response_port.recv()
}
@@ -699,7 +700,7 @@ impl LayoutTask {
debug!("Layout done!");
- self.paint_chan.send(PaintInitMsg(stacking_context));
+ self.paint_chan.send(PaintMsg::PaintInit(stacking_context));
});
}