mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
shell: set no-wgl
flag in servoshell instead (#32753)
* Set no-wgl flag in servoshell instead Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Remove unused comment Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
This commit is contained in:
parent
313536fd82
commit
3e163bfcdb
6 changed files with 14 additions and 16 deletions
|
@ -20,7 +20,7 @@ max_log_level = ["log/release_max_level_info"]
|
|||
media-gstreamer = ["servo-media-gstreamer", "gstreamer"]
|
||||
multiview = ["compositing/multiview", "constellation/multiview"]
|
||||
native-bluetooth = ["bluetooth/native-bluetooth"]
|
||||
no-wgl = ["canvas/no-wgl"]
|
||||
no-wgl = ["mozangle/egl", "mozangle/build_dlls", "surfman/sm-angle-default"]
|
||||
dynamic_freetype = ["webrender/dynamic_freetype"]
|
||||
profilemozjs = ["script/profilemozjs"]
|
||||
refcell_backtrace = ["script/refcell_backtrace"]
|
||||
|
@ -86,6 +86,3 @@ webxr-api = { git = "https://github.com/servo/webxr" }
|
|||
|
||||
[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
|
||||
gaol = "0.2.1"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
mozangle = { workspace = true, features = ["egl", "build_dlls"] }
|
||||
|
|
|
@ -525,10 +525,16 @@ where
|
|||
fn get_native_media_display_and_gl_context(
|
||||
rendering_context: &RenderingContext,
|
||||
) -> Option<(NativeDisplay, GlContext)> {
|
||||
let gl_context = GlContext::Egl(rendering_context.native_context().egl_context as usize);
|
||||
let native_display =
|
||||
NativeDisplay::Egl(rendering_context.native_device().egl_display as usize);
|
||||
Some((native_display, gl_context))
|
||||
#[cfg(feature = "no-wgl")]
|
||||
{
|
||||
let gl_context =
|
||||
GlContext::Egl(rendering_context.native_context().egl_context as usize);
|
||||
let native_display =
|
||||
NativeDisplay::Egl(rendering_context.native_device().egl_display as usize);
|
||||
Some((native_display, gl_context))
|
||||
}
|
||||
#[cfg(not(feature = "no-wgl"))]
|
||||
None
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue