task -> thread

This commit is contained in:
rohan.prinja 2015-11-14 05:07:55 +09:00 committed by Rohan Prinja
parent f00532bab0
commit 1f02c4ebbb
119 changed files with 1209 additions and 1207 deletions

View file

@ -21,11 +21,11 @@ extern crate util;
// The traits are here instead of in layout so
// that these modules won't have to depend on layout.
use gfx::font_cache_task::FontCacheTask;
use gfx::paint_task::LayoutToPaintMsg;
use gfx::font_cache_thread::FontCacheThread;
use gfx::paint_thread::LayoutToPaintMsg;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
use net_traits::image_cache_task::ImageCacheTask;
use net_traits::image_cache_thread::ImageCacheThread;
use profile_traits::{mem, time};
use script_traits::LayoutMsg as ConstellationMsg;
use script_traits::{LayoutControlMsg, ConstellationControlMsg, OpaqueScriptLayoutChannel};
@ -36,9 +36,9 @@ use util::ipc::OptionalIpcSender;
#[derive(Clone, Deserialize, Serialize)]
pub struct LayoutControlChan(pub IpcSender<LayoutControlMsg>);
// A static method creating a layout task
// A static method creating a layout thread
// Here to remove the compositor -> layout dependency
pub trait LayoutTaskFactory {
pub trait LayoutThreadFactory {
// FIXME: use a proper static method
fn create(_phantom: Option<&mut Self>,
id: PipelineId,
@ -50,8 +50,8 @@ pub trait LayoutTaskFactory {
failure_msg: Failure,
script_chan: IpcSender<ConstellationControlMsg>,
layout_to_paint_chan: OptionalIpcSender<LayoutToPaintMsg>,
image_cache_task: ImageCacheTask,
font_cache_task: FontCacheTask,
image_cache_thread: ImageCacheThread,
font_cache_thread: FontCacheThread,
time_profiler_chan: time::ProfilerChan,
mem_profiler_chan: mem::ProfilerChan,
shutdown_chan: IpcSender<()>,