diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2015-07-13 17:02:35 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2015-07-25 00:50:12 -0700 |
commit | bb99b2f3c8813919c476930c709b73d3cfbc8c83 (patch) | |
tree | 15641e7ed77b46ab61bab772fa3c63b7e8e8d619 /components/layout/layout_task.rs | |
parent | 886c08c393f51499490702eaf97fc770273a2600 (diff) | |
download | servo-bb99b2f3c8813919c476930c709b73d3cfbc8c83.tar.gz servo-bb99b2f3c8813919c476930c709b73d3cfbc8c83.zip |
script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r-- | components/layout/layout_task.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 6adb14a4c68..a6c92306273 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -39,7 +39,7 @@ use gfx::display_list::StackingContext; use gfx::font_cache_task::FontCacheTask; use gfx::paint_task::Msg as PaintMsg; use gfx::paint_task::{PaintChan, PaintLayer}; -use ipc_channel::ipc::{self, IpcReceiver}; +use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::router::ROUTER; use layout_traits::LayoutTaskFactory; use log; @@ -197,8 +197,8 @@ pub struct LayoutTask { /// To receive a canvas renderer associated to a layer, this message is propagated /// to the paint chan - pub canvas_layers_receiver: Receiver<(LayerId, Option<Arc<Mutex<Sender<CanvasMsg>>>>)>, - pub canvas_layers_sender: Sender<(LayerId, Option<Arc<Mutex<Sender<CanvasMsg>>>>)>, + pub canvas_layers_receiver: Receiver<(LayerId, IpcSender<CanvasMsg>)>, + pub canvas_layers_sender: Sender<(LayerId, IpcSender<CanvasMsg>)>, /// A mutex to allow for fast, read-only RPC of layout's internal data /// structures, while still letting the LayoutTask modify them. @@ -1030,9 +1030,7 @@ impl LayoutTask { // Send new canvas renderers to the paint task while let Ok((layer_id, renderer)) = self.canvas_layers_receiver.try_recv() { // Just send if there's an actual renderer - if let Some(renderer) = renderer { - self.paint_chan.send(PaintMsg::CanvasLayer(layer_id, renderer)); - } + self.paint_chan.send(PaintMsg::CanvasLayer(layer_id, renderer)); } // Perform post-style recalculation layout passes. |