mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #23483 - ceyusa:player-context, r=jdm
Media player rendering with GL textures These patches pass the application's OpenGL raw context and the its native display address to the media player, in order to create an internal wrapped context, thus it will generate video frames as textures. For now only EGL from glutin-based app and android are in place, though tested only in Linux glutin app. This PR also renders the generated frame textures by Servo/Media and renders them by using a thread that connects Webrenderer's ExternalImageHandler and each instantiated player. **By now, these patches, disable the WebGL rendering**. We need to provide a ExternalImageHandler demuxer. This PR depends on https://github.com/servo/media/pull/270 - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - This PR fixes #22300 and fixes #22920 In order to test it you must launch servo as `./mach run -- --pref media.glvideo.enabled [...]` <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23483) <!-- Reviewable:end -->
This commit is contained in:
commit
0dc17af7f0
38 changed files with 1282 additions and 128 deletions
|
@ -144,8 +144,8 @@ pub unsafe extern "C" fn init_servo(
|
|||
VRInitOptions::None
|
||||
} else {
|
||||
let name = String::from("Magic Leap VR Display");
|
||||
let (service, heartbeat) =
|
||||
MagicLeapVRService::new(name, ctxt, gl.clone()).expect("Failed to create VR service");
|
||||
let (service, heartbeat) = MagicLeapVRService::new(name, ctxt, gl.gl_wrapper.clone())
|
||||
.expect("Failed to create VR service");
|
||||
let service = Box::new(service);
|
||||
let heartbeat = Box::new(heartbeat);
|
||||
VRInitOptions::VRService(service, heartbeat)
|
||||
|
@ -157,6 +157,8 @@ pub unsafe extern "C" fn init_servo(
|
|||
enable_subpixel_text_antialiasing: false,
|
||||
vr_init,
|
||||
coordinates,
|
||||
gl_context_pointer: Some(gl.gl_context),
|
||||
native_display_pointer: Some(gl.display),
|
||||
};
|
||||
let wakeup = Box::new(EventLoopWakerInstance);
|
||||
let shut_down_complete = Rc::new(Cell::new(false));
|
||||
|
@ -172,7 +174,7 @@ pub unsafe extern "C" fn init_servo(
|
|||
keyboard,
|
||||
});
|
||||
info!("Starting servo");
|
||||
simpleservo::init(opts, gl, wakeup, callbacks).expect("error initializing Servo");
|
||||
simpleservo::init(opts, gl.gl_wrapper, wakeup, callbacks).expect("error initializing Servo");
|
||||
|
||||
let result = Box::new(ServoInstance {
|
||||
scroll_state: ScrollState::TriggerUp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue