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:
Víctor Manuel Jáquez Leal 2018-08-22 18:13:13 +02:00 committed by Fernando Jiménez Moreno
parent 77c7eda0bf
commit 781b3b712b
4 changed files with 32 additions and 3 deletions

View file

@ -72,7 +72,9 @@ use style_traits::CSSPixel;
use style_traits::SpeculativePainter;
use style_traits::cursor::CursorKind;
use webdriver_msg::{LoadStatus, WebDriverScriptCommand};
use webrender_api::{ExternalScrollId, DevicePixel, DeviceUintSize, DocumentId, ImageKey};
use webrender_api::{
DevicePixel, DeviceUintSize, DocumentId, ExternalScrollId, ImageKey, RenderApiSender,
};
use webvr_traits::{WebVREvent, WebVRMsg};
pub use script_msg::{LayoutMsg, ScriptMsg, EventResult, LogEntry};
@ -588,6 +590,8 @@ pub struct InitialScriptState {
pub webvr_chan: Option<IpcSender<WebVRMsg>>,
/// The Webrender document ID associated with this thread.
pub webrender_document: DocumentId,
/// FIXME(victor): The Webrender API sender in this constellation's pipeline
pub webrender_api_sender: RenderApiSender,
}
/// This trait allows creating a `ScriptThread` without depending on the `script`