mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add media (WindowGLContext) module in canvas_trait
This module adds a structure (WindowGLContext) which holds the OpenGL parameters that are going to be used by servo-media player to render video frames using OpenGL. In order to fill this structure, three new methods were added to WindowMethods trait. In this patch only the Glutin-based implementation provides a simple boilerplate. The WindowGLContext is created in the entry point of libservo, when the application window is created, and later passed to the constellation, the pipeline and to the window element in dom, thus htmlmediaelement has a mean to obtain these parameters via its window.
This commit is contained in:
parent
e9f46f9d72
commit
9f4f9dc750
16 changed files with 133 additions and 26 deletions
|
@ -21,6 +21,7 @@ pub mod webdriver_msg;
|
|||
|
||||
use crate::webdriver_msg::{LoadStatus, WebDriverScriptCommand};
|
||||
use bluetooth_traits::BluetoothRequest;
|
||||
use canvas_traits::media::WindowGLContext;
|
||||
use canvas_traits::webgl::WebGLPipeline;
|
||||
use crossbeam_channel::{Receiver, RecvTimeoutError, Sender};
|
||||
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
|
||||
|
@ -636,6 +637,8 @@ pub struct InitialScriptState {
|
|||
pub webrender_api_sender: RenderApiSender,
|
||||
/// Flag to indicate if the layout thread is busy handling a request.
|
||||
pub layout_is_busy: Arc<AtomicBool>,
|
||||
/// Application window's GL Context for Media player
|
||||
pub player_context: WindowGLContext,
|
||||
}
|
||||
|
||||
/// This trait allows creating a `ScriptThread` without depending on the `script`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue