mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +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
|
@ -115,8 +115,7 @@ string_cache_codegen = "0.5"
|
|||
style = { git = "https://github.com/servo/stylo", branch = "2024-05-31", features = ["servo"] }
|
||||
style_config = { git = "https://github.com/servo/stylo", branch = "2024-05-31" }
|
||||
style_traits = { git = "https://github.com/servo/stylo", branch = "2024-05-31", features = ["servo"] }
|
||||
# NOTE: the sm-angle feature only enables ANGLE on Windows, not other platforms!
|
||||
surfman = { version = "0.9", features = ["chains", "sm-angle", "sm-angle-default"] }
|
||||
surfman = { version = "0.9", features = ["chains"] }
|
||||
syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] }
|
||||
synstructure = "0.13"
|
||||
thin-vec = "0.2.13"
|
||||
|
|
|
@ -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"]
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -45,7 +45,6 @@ max_log_level = ["log/release_max_level_info"]
|
|||
media-gstreamer = ["libservo/media-gstreamer"]
|
||||
multiview = ["libservo/multiview"]
|
||||
native-bluetooth = ["libservo/native-bluetooth"]
|
||||
no-wgl = ["libservo/no-wgl"]
|
||||
profilemozjs = ["libservo/profilemozjs"]
|
||||
refcell_backtrace = ["libservo/refcell_backtrace"]
|
||||
webdriver = ["libservo/webdriver"]
|
||||
|
@ -116,3 +115,4 @@ sig = "1.0"
|
|||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
windows-sys = { workspace = true, features = ["Win32_Graphics_Gdi"] }
|
||||
libservo = { path = "../../components/servo", features = ["no-wgl"] }
|
||||
|
|
|
@ -862,7 +862,6 @@ class CommandBase(object):
|
|||
action='store_true',
|
||||
help='Build with frame pointer enabled, used by the background hang monitor.',
|
||||
),
|
||||
CommandArgument('--without-wgl', group="Feature Selection", default=None, action='store_true'),
|
||||
CommandArgument(
|
||||
'--use-crown',
|
||||
default=False,
|
||||
|
@ -982,7 +981,7 @@ class CommandBase(object):
|
|||
self, command: str, cargo_args: List[str],
|
||||
env=None, verbose=False,
|
||||
debug_mozjs=False, with_debug_assertions=False,
|
||||
with_frame_pointer=False, without_wgl=False,
|
||||
with_frame_pointer=False,
|
||||
use_crown=False,
|
||||
target_override: Optional[str] = None,
|
||||
**_kwargs
|
||||
|
@ -1042,8 +1041,6 @@ class CommandBase(object):
|
|||
if with_frame_pointer:
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C force-frame-pointers=yes"
|
||||
features.append("profilemozjs")
|
||||
if without_wgl:
|
||||
features.append("no-wgl")
|
||||
if self.config["build"]["webgl-backtrace"]:
|
||||
features.append("webgl-backtrace")
|
||||
if self.config["build"]["dom-backtrace"]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue