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:
Ngo Iok Ui (Wu Yu Wei) 2024-07-10 23:50:27 +09:00 committed by GitHub
parent 313536fd82
commit 3e163bfcdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 16 deletions

View file

@ -11,7 +11,6 @@ name = "canvas"
path = "lib.rs"
[features]
no-wgl = ["surfman/sm-no-wgl"]
webgl_backtrace = ["canvas_traits/webgl_backtrace"]
xr-profile = ["webxr-api/profile", "time"]

View file

@ -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"] }

View file

@ -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(