layout: Make the LayoutControlChan use IPC.

This commit is contained in:
Patrick Walton 2015-07-10 18:55:20 -07:00
parent e841065351
commit 9ce65c08a5
18 changed files with 277 additions and 76 deletions

View file

@ -19,6 +19,7 @@ use euclid::rect::{Rect, TypedRect};
use euclid::size::Size2D;
use euclid::scale_factor::ScaleFactor;
use gfx::font_cache_task::FontCacheTask;
use ipc_channel::ipc;
use layout_traits::{LayoutControlChan, LayoutControlMsg, LayoutTaskFactory};
use libc;
use msg::compositor_msg::{Epoch, LayerId};
@ -1128,7 +1129,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
// epoch matches what the compositor has drawn. If they match
// (and script is idle) then this pipeline won't change again
// and can be considered stable.
let (sender, receiver) = channel();
let (sender, receiver) = ipc::channel().unwrap();
let LayoutControlChan(ref layout_chan) = pipeline.layout_chan;
layout_chan.send(LayoutControlMsg::GetCurrentEpoch(sender)).unwrap();
let layout_task_epoch = receiver.recv().unwrap();