Skip to content
Permalink
Browse files

Add media.glvideo preference

  • Loading branch information...
ceyusa authored and ferjm committed Jun 4, 2019
1 parent 08d812e commit da8eb18763e5b0b9bd46ee9f6aa5f50e7c053b19
Showing with 14 additions and 2 deletions.
  1. +3 −0 components/config/prefs.rs
  2. +10 −2 ports/glutin/headed_window.rs
  3. +1 −0 resources/prefs.json
@@ -446,6 +446,9 @@ mod gen {
}
},
media: {
glvideo: {
enabled: bool,
},
testing: {
enabled: bool,
}
@@ -24,7 +24,7 @@ use servo::compositing::windowing::{AnimationState, MouseWindowEvent, WindowEven
use servo::compositing::windowing::{EmbedderCoordinates, WindowMethods};
use servo::embedder_traits::Cursor;
use servo::script_traits::{TouchEventType, WheelMode, WheelDelta};
use servo::servo_config::opts;
use servo::servo_config::{opts, pref};
use servo::servo_geometry::DeviceIndependentPixel;
use servo::style_traits::DevicePixel;
use servo::webrender_api::{
@@ -527,10 +527,18 @@ impl WindowMethods for Window {
}

fn get_gl_context(&self) -> PlayerGLContext {
self.gl_context.borrow().raw_context()
if pref!(media.glvideo.enabled) {
self.gl_context.borrow().raw_context()
} else {
PlayerGLContext::Unknown
}
}

fn get_native_display(&self) -> NativeDisplay {
if !pref!(media.glvideo.enabled) {
return NativeDisplay::Unknown;
}

#[cfg(any(
target_os = "linux",
target_os = "dragonfly",
@@ -84,6 +84,7 @@
"layout.threads": 3,
"layout.viewport.enabled": false,
"layout.writing-mode.enabled": false,
"media.glvideo.enabled": false,
"media.testing.enabled": false,
"network.http-cache.disabled": false,
"network.mime.sniff": false,

0 comments on commit da8eb18

Please sign in to comment.
You can’t perform that action at this time.