commit ffe33fa3dfc65212a9f80f19c3f853c7618a47e4
parent 58c3eb48f98aef9d73bfb2d5cb17ca07ca5a376a
Author: Nicolas Silva <nical@fastmail.com>
Date: Mon, 13 Oct 2025 15:01:51 +0000
Bug 1978773 - Enable precise conic gradients (GPU-only). r=gfx-reviewers,lsalzman
A followup patch will enable this for SWGL.
Differential Revision: https://phabricator.services.mozilla.com/D266821
Diffstat:
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gfx/wr/wrench/reftests/gradient/reftest.list b/gfx/wr/wrench/reftests/gradient/reftest.list
@@ -90,7 +90,7 @@ fuzzy(255,429) == conic-angle.yaml conic-angle.png
== conic-center.yaml conic-center.png
fuzzy(1,2) == conic-angle-wraparound.yaml conic-angle.yaml
fuzzy-if(env(android,device),255,155) fuzzy-if(not(env(android,device)),1,5) == conic-angle-wraparound-negative.yaml conic-angle.yaml # Android device is Samsung Galaxy A51
-fuzzy(1,1200) == conic-color-wheel.yaml conic-color-wheel.png
+fuzzy(4,61900) == conic-color-wheel.yaml conic-color-wheel.png
# gradient caching tests
# replaces a computed gradient by a sampled texture, so a lot of off-by-one
diff --git a/gfx/wr/wrench/src/wrench.rs b/gfx/wr/wrench/src/wrench.rs
@@ -281,6 +281,7 @@ impl Wrench {
compositor_config,
enable_debugger: true,
precise_radial_gradients: true,
+ precise_conic_gradients: !window.is_software(),
..Default::default()
};
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
@@ -8132,7 +8132,7 @@
- name: gfx.webrender.precise-conic-gradients
type: bool
rust: true
- value: false
+ value: true
mirror: once
# Use a more precise method for sampling gradients when using SWGL.