Default Servo live rendering to software
This commit is contained in:
@@ -6,9 +6,10 @@ use std::{
|
||||
|
||||
/// Environment variable that lets the user pick the rendering context
|
||||
/// kind used by the spawned sidecar. Accepted values: `software`
|
||||
/// and `hardware`. macOS defaults to hardware because GPUI can now
|
||||
/// present Servo's BGRA IOSurfaces directly; other platforms keep the
|
||||
/// software context until they have an equivalent presenter.
|
||||
/// and `hardware`. The default stays on the software context because
|
||||
/// the live sidecar talks to the app over stdio; the hardware path
|
||||
/// requires a transport that moves the IOSurface mach send right into
|
||||
/// the receiver process.
|
||||
use ely_domain::SitePermissionDecision;
|
||||
use serde::Serialize;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -138,12 +138,6 @@ fn rendering_context_selection(raw: Option<&str>) -> SidecarRenderingContext {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn default_rendering_context() -> SidecarRenderingContext {
|
||||
SidecarRenderingContext::Hardware
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
fn default_rendering_context() -> SidecarRenderingContext {
|
||||
SidecarRenderingContext::Software
|
||||
}
|
||||
@@ -182,16 +176,8 @@ mod tests {
|
||||
assert_eq!(context.sidecar_features(), SOFTWARE_SIDECAR_FEATURES);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[test]
|
||||
fn macos_defaults_to_hardware_rendering_context() {
|
||||
assert_eq!(rendering_context_selection(None), SidecarRenderingContext::Hardware);
|
||||
assert_eq!(rendering_context_selection(Some("garbage")), SidecarRenderingContext::Hardware);
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
#[test]
|
||||
fn non_macos_defaults_to_software_rendering_context() {
|
||||
fn defaults_to_software_rendering_context() {
|
||||
assert_eq!(rendering_context_selection(None), SidecarRenderingContext::Software);
|
||||
assert_eq!(rendering_context_selection(Some("garbage")), SidecarRenderingContext::Software);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user