aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits')
-rw-r--r--components/script_traits/Cargo.toml1
-rw-r--r--components/script_traits/lib.rs8
-rw-r--r--components/script_traits/script_msg.rs8
3 files changed, 5 insertions, 12 deletions
diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml
index 70fcdbb3f33..2c083b2773c 100644
--- a/components/script_traits/Cargo.toml
+++ b/components/script_traits/Cargo.toml
@@ -25,7 +25,6 @@ libc = "0.2"
metrics = {path = "../metrics"}
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
-offscreen_gl_context = { version = "0.11", features = ["serde"] }
profile_traits = {path = "../profile_traits"}
rustc-serialize = "0.3.4"
serde = "1.0"
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 85122d35c3c..4a197e759ff 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -24,7 +24,6 @@ extern crate ipc_channel;
extern crate libc;
extern crate msg;
extern crate net_traits;
-extern crate offscreen_gl_context;
extern crate profile_traits;
extern crate rustc_serialize;
#[macro_use] extern crate serde;
@@ -39,6 +38,7 @@ mod script_msg;
pub mod webdriver_msg;
use bluetooth_traits::BluetoothRequest;
+use canvas_traits::webgl::WebGLPipeline;
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
use euclid::{Size2D, Length, Point2D, Vector2D, Rect, ScaleFactor, TypedSize2D};
use gfx_traits::Epoch;
@@ -524,8 +524,10 @@ pub struct InitialScriptState {
pub pipeline_namespace_id: PipelineNamespaceId,
/// A ping will be sent on this channel once the script thread shuts down.
pub content_process_shutdown_chan: IpcSender<()>,
+ /// A channel to the webgl thread used in this pipeline.
+ pub webgl_chan: WebGLPipeline,
/// A channel to the webvr thread, if available.
- pub webvr_thread: Option<IpcSender<WebVRMsg>>
+ pub webvr_chan: Option<IpcSender<WebVRMsg>>
}
/// This trait allows creating a `ScriptThread` without depending on the `script`
@@ -759,8 +761,6 @@ pub enum ConstellationMsg {
Reload(TopLevelBrowsingContextId),
/// A log entry, with the top-level browsing context id and thread name
LogEntry(Option<TopLevelBrowsingContextId>, Option<String>, LogEntry),
- /// Set the WebVR thread channel.
- SetWebVRThread(IpcSender<WebVRMsg>),
/// Dispatch WebVR events to the subscribed script threads.
WebVREvents(Vec<PipelineId>, Vec<WebVREvent>),
/// Create a new top level browsing context.
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs
index 4fd8fca5c7f..156f85a2be7 100644
--- a/components/script_traits/script_msg.rs
+++ b/components/script_traits/script_msg.rs
@@ -12,7 +12,7 @@ use LoadData;
use MozBrowserEvent;
use WorkerGlobalScopeInit;
use WorkerScriptLoadOrigin;
-use canvas_traits::CanvasMsg;
+use canvas_traits::canvas::CanvasMsg;
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
use euclid::{Point2D, Size2D, TypedSize2D};
use ipc_channel::ipc::IpcSender;
@@ -21,7 +21,6 @@ use msg::constellation_msg::{Key, KeyModifiers, KeyState};
use net_traits::CoreResourceMsg;
use net_traits::request::RequestInit;
use net_traits::storage_thread::StorageType;
-use offscreen_gl_context::{GLContextAttributes, GLLimits};
use servo_url::ImmutableOrigin;
use servo_url::ServoUrl;
use style_traits::CSSPixel;
@@ -78,11 +77,6 @@ pub enum ScriptMsg {
/// Requests that a new 2D canvas thread be created. (This is done in the constellation because
/// 2D canvases may use the GPU and we don't want to give untrusted content access to the GPU.)
CreateCanvasPaintThread(Size2D<i32>, IpcSender<IpcSender<CanvasMsg>>),
- /// Requests that a new WebGL thread be created. (This is done in the constellation because
- /// WebGL uses the GPU and we don't want to give untrusted content access to the GPU.)
- CreateWebGLPaintThread(Size2D<i32>,
- GLContextAttributes,
- IpcSender<Result<(IpcSender<CanvasMsg>, GLLimits), String>>),
/// Notifies the constellation that this frame has received focus.
Focus,
/// Forward an event that was sent to the parent window.