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

@ -21,7 +21,6 @@ use crate::canvas_data::{
self, Backend, CanvasPaintState, Color, CompositionOp, DrawOptions, Filter, GenericDrawTarget,
GenericPathBuilder, GradientStop, GradientStops, Path, SourceSurface, StrokeOptions, TextRun,
};
use crate::canvas_paint_thread::AntialiasMode;
thread_local! {
/// The shared font cache used by all canvases that render on a thread. It would be nicer
@ -85,12 +84,12 @@ impl Backend for RaqoteBackend {
}
fn recreate_paint_state<'a>(&self, _state: &CanvasPaintState<'a>) -> CanvasPaintState<'a> {
CanvasPaintState::new(AntialiasMode::Default)
CanvasPaintState::default()
}
}
impl<'a> CanvasPaintState<'a> {
pub fn new(_antialias: AntialiasMode) -> CanvasPaintState<'a> {
impl Default for CanvasPaintState<'_> {
fn default() -> Self {
let pattern = Pattern::Color(255, 0, 0, 0);
CanvasPaintState {
draw_options: DrawOptions::Raqote(raqote::DrawOptions::new()),