aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/workerglobalscope.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-07-25 01:50:31 -0600
committerbors-servo <metajack+bors@gmail.com>2015-07-25 01:50:31 -0600
commit1764267379a00b96a1df89f3917299a0c6fd325c (patch)
tree15641e7ed77b46ab61bab772fa3c63b7e8e8d619 /components/script/dom/workerglobalscope.rs
parent886c08c393f51499490702eaf97fc770273a2600 (diff)
parentbb99b2f3c8813919c476930c709b73d3cfbc8c83 (diff)
downloadservo-1764267379a00b96a1df89f3917299a0c6fd325c.tar.gz
servo-1764267379a00b96a1df89f3917299a0c6fd325c.zip
Auto merge of #6616 - pcwalton:canvas-webgl-ipc, r=jdm
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. r? @jdm <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6616) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/workerglobalscope.rs')
-rw-r--r--components/script/dom/workerglobalscope.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs
index 260476859e9..8d473f6f081 100644
--- a/components/script/dom/workerglobalscope.rs
+++ b/components/script/dom/workerglobalscope.rs
@@ -22,7 +22,7 @@ use timers::{IsInterval, TimerId, TimerManager, TimerCallback};
use devtools_traits::DevtoolsControlChan;
-use msg::constellation_msg::{PipelineId, WorkerId};
+use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
use profile_traits::mem;
use net_traits::{load_whole_resource, ResourceTask};
use util::str::DOMString;
@@ -55,6 +55,7 @@ pub struct WorkerGlobalScope {
timers: TimerManager,
mem_profiler_chan: mem::ProfilerChan,
devtools_chan: Option<DevtoolsControlChan>,
+ constellation_chan: ConstellationChan,
}
impl WorkerGlobalScope {
@@ -63,7 +64,8 @@ impl WorkerGlobalScope {
runtime: Rc<Runtime>,
resource_task: ResourceTask,
mem_profiler_chan: mem::ProfilerChan,
- devtools_chan: Option<DevtoolsControlChan>) -> WorkerGlobalScope {
+ devtools_chan: Option<DevtoolsControlChan>,
+ constellation_chan: ConstellationChan) -> WorkerGlobalScope {
WorkerGlobalScope {
eventtarget: EventTarget::new_inherited(EventTargetTypeId::WorkerGlobalScope(type_id)),
next_worker_id: Cell::new(WorkerId(0)),
@@ -77,6 +79,7 @@ impl WorkerGlobalScope {
timers: TimerManager::new(),
mem_profiler_chan: mem_profiler_chan,
devtools_chan: devtools_chan,
+ constellation_chan: constellation_chan,
}
}
@@ -88,6 +91,10 @@ impl WorkerGlobalScope {
self.devtools_chan.clone()
}
+ pub fn constellation_chan(&self) -> ConstellationChan {
+ self.constellation_chan.clone()
+ }
+
#[inline]
pub fn eventtarget<'a>(&'a self) -> &'a EventTarget {
&self.eventtarget