servo: Merge #18118 - Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox" (from servo:oops-webgl); r=emilio

This reverts commit 4d10d39e8fe841c5fe2ac58da2daaa13c10c140e, reversing
changes made to ee94e2b7c0bd327abe8f9545b2a1f792f67a2bdd.

Source-Repo: https://github.com/servo/servo
Source-Revision: fbabcaf614662a52eace21a64f27802c7eff4304
This commit is contained in:
Anthony Ramine
2017-08-17 00:26:08 -05:00
parent baa2b4fc88
commit 54d7d02d35
54 changed files with 3154 additions and 1426 deletions

View File

@@ -18,6 +18,7 @@
//! loop.
use bluetooth_traits::BluetoothRequest;
use canvas_traits::webgl::WebGLPipeline;
use devtools;
use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo};
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
@@ -508,8 +509,11 @@ pub struct ScriptThread {
/// The unit of related similar-origin browsing contexts' list of MutationObserver objects
mutation_observers: DOMRefCell<Vec<JS<MutationObserver>>>,
/// A handle to the webgl thread
webgl_chan: WebGLPipeline,
/// A handle to the webvr thread, if available
webvr_thread: Option<IpcSender<WebVRMsg>>,
webvr_chan: Option<IpcSender<WebVRMsg>>,
/// The worklet thread pool
worklet_thread_pool: DOMRefCell<Option<Rc<WorkletThreadPool>>>,
@@ -881,7 +885,8 @@ impl ScriptThread {
layout_to_constellation_chan: state.layout_to_constellation_chan,
webvr_thread: state.webvr_thread,
webgl_chan: state.webgl_chan,
webvr_chan: state.webvr_chan,
worklet_thread_pool: Default::default(),
@@ -2028,7 +2033,8 @@ impl ScriptThread {
origin,
incomplete.navigation_start,
incomplete.navigation_start_precise,
self.webvr_thread.clone());
self.webgl_chan.channel(),
self.webvr_chan.clone());
// Initialize the browsing context for the window.
let window_proxy = self.local_window_proxy(&window,