summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wrench/reftests/aa
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml43
-rw-r--r--gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/aa/fractional-radii.yaml42
-rw-r--r--gfx/wr/wrench/reftests/aa/reftest.list3
-rw-r--r--gfx/wr/wrench/reftests/aa/rounded-rects-ref.pngbin0 -> 10886 bytes
-rw-r--r--gfx/wr/wrench/reftests/aa/rounded-rects.yaml41
7 files changed, 153 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml b/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml
new file mode 100644
index 0000000000..c83fff2a0b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ color: red
+ bounds: [340, 184, 50, 20]
diff --git a/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml b/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml
new file mode 100644
index 0000000000..19b747aabc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml
@@ -0,0 +1,43 @@
+# Test that when the AA range is > 1, the AA is correctly applied to
+# an ellipse clip. This is a regression test for issue #2576.
+# The rectangles below mask out most of the box shadow and rounded
+# corners, which are not relevant to what is being tested here.
+---
+root:
+ items:
+ - type: stacking-context
+ transform: rotate-z(-45) rotate-x(-60)
+ transform-origin: 300 300
+ items:
+ - type: box-shadow
+ bounds: [0, 0, 150, 150]
+ color: black
+ offset: [150, 50]
+ border-radius: 8
+
+ - type: clip
+ bounds: [90, 0, 150, 150]
+ complex:
+ - rect: [90, 0, 150, 150]
+ radius: 8
+ items:
+ - type: rect
+ color: red
+ border-radius: 8
+ bounds: [90, 0, 150, 150]
+
+ - type: rect
+ color: white
+ bounds: [250, 100, 240, 84]
+
+ - type: rect
+ color: white
+ bounds: [250, 204, 240, 70]
+
+ - type: rect
+ color: white
+ bounds: [240, 100, 100, 150]
+
+ - type: rect
+ color: white
+ bounds: [390, 100, 100, 150]
diff --git a/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml b/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml
new file mode 100644
index 0000000000..364d6e7529
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: 20 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 140 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 260 50 100 100
+ color: blue
+
+ - type: rect
+ bounds: 380 50 100 100
+ color: blue
diff --git a/gfx/wr/wrench/reftests/aa/fractional-radii.yaml b/gfx/wr/wrench/reftests/aa/fractional-radii.yaml
new file mode 100644
index 0000000000..9293c1b1e9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/fractional-radii.yaml
@@ -0,0 +1,42 @@
+---
+root:
+ items:
+ - type: clip
+ bounds: [20, 50, 100, 100]
+ complex:
+ - rect: [20, 50, 100, 100]
+ radius: 0
+ items:
+ - type: rect
+ bounds: 20 50 100 100
+ color: blue
+
+ - type: clip
+ bounds: [140, 50, 100, 100]
+ complex:
+ - rect: [140, 50, 100, 100]
+ radius: 0.001
+ items:
+ - type: rect
+ bounds: 140 50 100 100
+ color: blue
+
+ - type: clip
+ bounds: [260, 50, 100, 100]
+ complex:
+ - rect: [260, 50, 100, 100]
+ radius: 0.01
+ items:
+ - type: rect
+ bounds: 260 50 100 100
+ color: blue
+
+ - type: clip
+ bounds: [380, 50, 100, 100]
+ complex:
+ - rect: [380, 50, 100, 100]
+ radius: 0.1
+ items:
+ - type: rect
+ bounds: 380 50 100 100
+ color: blue
diff --git a/gfx/wr/wrench/reftests/aa/reftest.list b/gfx/wr/wrench/reftests/aa/reftest.list
new file mode 100644
index 0000000000..7ed4e0a108
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/reftest.list
@@ -0,0 +1,3 @@
+skip_on(android) fuzzy(1,1) fuzzy-if(platform(swgl),8,5) == rounded-rects.yaml rounded-rects-ref.png # Too wide for Android
+== aa-dist-bug.yaml aa-dist-bug-ref.yaml
+== fractional-radii.yaml fractional-radii-ref.yaml
diff --git a/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png b/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png
new file mode 100644
index 0000000000..7e84f0d569
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/aa/rounded-rects.yaml b/gfx/wr/wrench/reftests/aa/rounded-rects.yaml
new file mode 100644
index 0000000000..c82349a008
--- /dev/null
+++ b/gfx/wr/wrench/reftests/aa/rounded-rects.yaml
@@ -0,0 +1,41 @@
+---
+root:
+ items:
+ -
+ bounds: 0 0 1000 1000
+ type: stacking-context
+ items:
+ - type: clip
+ bounds: [50, 50, 200, 200]
+ complex:
+ - rect: [50, 50, 200, 200]
+ radius: 8
+ items:
+ - type: rect
+ bounds: 50 50 200 200
+ color: red
+
+ - type: clip
+ bounds: [270, 50, 200, 200]
+ complex:
+ - rect: [270, 50, 200, 200]
+ radius: [16, 32, 48, 64]
+ items:
+ - type: rect
+ bounds: 270 50 200 200
+ color: green
+
+ - type: clip
+ bounds: [490, 50, 500, 500]
+ complex:
+ - rect: [490, 50, 500, 500]
+ radius: {
+ top-left: [32, 16],
+ top-right: [40, 24],
+ bottom-left: [48, 64],
+ bottom-right: [52, 80],
+ }
+ items:
+ - type: rect
+ bounds: 490 50 500 500
+ color: blue