mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Provide webrender_api::RenderApiSender to ScriptThread and DOM Window
This will allow the HTMLMediaElement later to get a handle to the RenderApi for rendering video frames. At a later time, all media handling should be moved to its own thread/process that is communicated with via IPC. At that point this can be removed again. Original-patch-by: Sebastian Dröge <sebastian@centricular.com>
This commit is contained in:
parent
77c7eda0bf
commit
781b3b712b
4 changed files with 32 additions and 3 deletions
|
@ -130,7 +130,7 @@ use time::{get_time, precise_time_ns, Tm};
|
|||
use url::Position;
|
||||
use url::percent_encoding::percent_decode;
|
||||
use webdriver_handlers;
|
||||
use webrender_api::DocumentId;
|
||||
use webrender_api::{DocumentId, RenderApiSender};
|
||||
use webvr_traits::{WebVREvent, WebVRMsg};
|
||||
|
||||
pub type ImageCacheMsg = (PipelineId, PendingImageResponse);
|
||||
|
@ -591,6 +591,9 @@ pub struct ScriptThread {
|
|||
|
||||
/// The Webrender Document ID associated with this thread.
|
||||
webrender_document: DocumentId,
|
||||
|
||||
/// FIXME(victor):
|
||||
webrender_api_sender: RenderApiSender,
|
||||
}
|
||||
|
||||
/// In the event of thread panic, all data on the stack runs its destructor. However, there
|
||||
|
@ -1063,6 +1066,7 @@ impl ScriptThread {
|
|||
custom_element_reaction_stack: CustomElementReactionStack::new(),
|
||||
|
||||
webrender_document: state.webrender_document,
|
||||
webrender_api_sender: state.webrender_api_sender,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2584,6 +2588,7 @@ impl ScriptThread {
|
|||
self.webvr_chan.clone(),
|
||||
self.microtask_queue.clone(),
|
||||
self.webrender_document,
|
||||
self.webrender_api_sender.clone(),
|
||||
);
|
||||
|
||||
// Initialize the browsing context for the window.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue