diff options
author | Imanol Fernandez <mortimergoro@gmail.com> | 2017-09-21 15:16:46 +0200 |
---|---|---|
committer | Imanol Fernandez <mortimergoro@gmail.com> | 2017-10-16 20:56:53 +0200 |
commit | 8ae0739bab8a3c74e0685d9f53bbb155e4458aba (patch) | |
tree | e1521882893206d2dd3bf06de5260f7bf0994cb7 /components/script/dom/window.rs | |
parent | a9022be0c3e30249845ca5947ac0c0a6743c7991 (diff) | |
download | servo-8ae0739bab8a3c74e0685d9f53bbb155e4458aba.tar.gz servo-8ae0739bab8a3c74e0685d9f53bbb155e4458aba.zip |
Implement DOM to texture
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r-- | components/script/dom/window.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 1e4bf803427..047cc1678ea 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -123,7 +123,7 @@ use timers::{IsInterval, TimerCallback}; use tinyfiledialogs::{self, MessageBoxIcon}; use url::Position; use webdriver_handlers::jsval_to_webdriver; -use webrender_api::ClipId; +use webrender_api::{ClipId, DocumentId}; use webvr_traits::WebVRMsg; /// Current state of the window object @@ -289,6 +289,9 @@ pub struct Window { test_worklet: MutNullableDom<Worklet>, /// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet paint_worklet: MutNullableDom<Worklet>, + /// The Webrender Document id associated with this window. + #[ignore_heap_size_of = "defined in webrender_api"] + webrender_document: DocumentId, } impl Window { @@ -1760,6 +1763,10 @@ impl Window { .send(msg) .unwrap(); } + + pub fn webrender_document(&self) -> DocumentId { + self.webrender_document + } } impl Window { @@ -1794,6 +1801,7 @@ impl Window { webgl_chan: WebGLChan, webvr_chan: Option<IpcSender<WebVRMsg>>, microtask_queue: Rc<MicrotaskQueue>, + webrender_document: DocumentId, ) -> DomRoot<Self> { let layout_rpc: Box<LayoutRPC + Send> = { let (rpc_send, rpc_recv) = channel(); @@ -1868,6 +1876,7 @@ impl Window { unminified_js_dir: Default::default(), test_worklet: Default::default(), paint_worklet: Default::default(), + webrender_document, }); unsafe { |