prefs: Move some DebugOptions to Preferences and clean up (#34998)

- Move options configuring antialiasing and WebRender shader precache to
  the `Preferences` to group them with other related WebRender and DOM
  settings.
- Remove the option to disable antialiasing for canvases. This was
  unused.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-01-17 12:47:47 +01:00 committed by GitHub
parent e1b4649faf
commit 2d09552234
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 24 additions and 81 deletions

View file

@ -136,6 +136,13 @@ pub struct Preferences {
pub dom_worklet_blockingsleep: bool,
pub dom_worklet_testing_enabled: bool,
pub dom_worklet_timeout_ms: i64,
/// True to compile all WebRender shaders when Servo initializes. This is mostly
/// useful when modifying the shaders, to ensure they all compile after each change is
/// made.
pub gfx_precache_shaders: bool,
/// Whether or not antialiasing is enabled for text rendering.
pub gfx_text_antialiasing_enabled: bool,
/// Whether or not subpixel antialiasing is enabled for text rendering.
pub gfx_subpixel_text_antialiasing_enabled: bool,
pub gfx_texture_swizzling_enabled: bool,
pub js_asmjs_enabled: bool,
@ -305,6 +312,8 @@ impl Preferences {
fonts_monospace: String::new(),
fonts_sans_serif: String::new(),
fonts_serif: String::new(),
gfx_precache_shaders: true,
gfx_text_antialiasing_enabled: true,
gfx_subpixel_text_antialiasing_enabled: true,
gfx_texture_swizzling_enabled: true,
js_asmjs_enabled: true,