aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/canvas_paint_thread.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-01-17 12:47:47 +0100
committerGitHub <noreply@github.com>2025-01-17 11:47:47 +0000
commit2d09552234b08fa091866e2f799df0e841a99070 (patch)
tree1f7a2f3ffa945cbdb68bec711b36ab8430424f0b /components/canvas/canvas_paint_thread.rs
parente1b4649fafcfc0881367e8069f66359e3bfbc5eb (diff)
downloadservo-2d09552234b08fa091866e2f799df0e841a99070.tar.gz
servo-2d09552234b08fa091866e2f799df0e841a99070.zip
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>
Diffstat (limited to 'components/canvas/canvas_paint_thread.rs')
-rw-r--r--components/canvas/canvas_paint_thread.rs29
1 files changed, 5 insertions, 24 deletions
diff --git a/components/canvas/canvas_paint_thread.rs b/components/canvas/canvas_paint_thread.rs
index 7b3500e1290..673c151489d 100644
--- a/components/canvas/canvas_paint_thread.rs
+++ b/components/canvas/canvas_paint_thread.rs
@@ -20,11 +20,6 @@ use webrender_traits::CrossProcessCompositorApi;
use crate::canvas_data::*;
-pub enum AntialiasMode {
- Default,
- None,
-}
-
pub struct CanvasPaintThread<'a> {
canvases: HashMap<CanvasId, CanvasData<'a>>,
next_canvas_id: CanvasId,
@@ -95,12 +90,8 @@ impl<'a> CanvasPaintThread<'a> {
}
recv(create_receiver) -> msg => {
match msg {
- Ok(ConstellationCanvasMsg::Create {
- id_sender: creator,
- size,
- antialias
- }) => {
- let canvas_id = canvas_paint_thread.create_canvas(size, antialias);
+ Ok(ConstellationCanvasMsg::Create { id_sender: creator, size }) => {
+ let canvas_id = canvas_paint_thread.create_canvas(size);
creator.send(canvas_id).unwrap();
},
Ok(ConstellationCanvasMsg::Exit) => break,
@@ -118,22 +109,12 @@ impl<'a> CanvasPaintThread<'a> {
(create_sender, ipc_sender)
}
- pub fn create_canvas(&mut self, size: Size2D<u64>, antialias: bool) -> CanvasId {
- let antialias = if antialias {
- AntialiasMode::Default
- } else {
- AntialiasMode::None
- };
-
+ pub fn create_canvas(&mut self, size: Size2D<u64>) -> CanvasId {
let canvas_id = self.next_canvas_id;
self.next_canvas_id.0 += 1;
- let canvas_data = CanvasData::new(
- size,
- self.compositor_api.clone(),
- antialias,
- self.font_context.clone(),
- );
+ let canvas_data =
+ CanvasData::new(size, self.compositor_api.clone(), self.font_context.clone());
self.canvases.insert(canvas_id, canvas_data);
canvas_id