summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wrench/reftests/snap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /gfx/wr/wrench/reftests/snap
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/wr/wrench/reftests/snap')
-rw-r--r--gfx/wr/wrench/reftests/snap/1761299-ref.yaml6
-rw-r--r--gfx/wr/wrench/reftests/snap/1761299.yaml12
-rw-r--r--gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml13
-rw-r--r--gfx/wr/wrench/reftests/snap/fractional-filter.yaml14
-rw-r--r--gfx/wr/wrench/reftests/snap/preserve-3d.pngbin0 -> 6837 bytes
-rw-r--r--gfx/wr/wrench/reftests/snap/preserve-3d.yaml55
-rw-r--r--gfx/wr/wrench/reftests/snap/reftest.list6
-rw-r--r--gfx/wr/wrench/reftests/snap/snap.pngbin0 -> 164 bytes
-rw-r--r--gfx/wr/wrench/reftests/snap/snap.yaml15
-rw-r--r--gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml7
-rw-r--r--gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml13
-rw-r--r--gfx/wr/wrench/reftests/snap/transform.pngbin0 -> 412 bytes
-rw-r--r--gfx/wr/wrench/reftests/snap/transform.yaml19
13 files changed, 160 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/snap/1761299-ref.yaml b/gfx/wr/wrench/reftests/snap/1761299-ref.yaml
new file mode 100644
index 0000000000..5102c7331e
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/1761299-ref.yaml
@@ -0,0 +1,6 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [0, 0, 512, 128]
+ color: red
diff --git a/gfx/wr/wrench/reftests/snap/1761299.yaml b/gfx/wr/wrench/reftests/snap/1761299.yaml
new file mode 100644
index 0000000000..f36f0c4e50
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/1761299.yaml
@@ -0,0 +1,12 @@
+# verify that the raster spatial node selected when a surface is too large
+# is correct propagated to the picture render task
+---
+root:
+ items:
+ - type: stacking-context
+ filters: [identity]
+ transform: scale(0.5,1,1)
+ items:
+ - type: rect
+ bounds: [0, 0, 1024, 128]
+ color: red
diff --git a/gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml b/gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml
new file mode 100644
index 0000000000..c8985a7d81
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/fractional-filter-ref.yaml
@@ -0,0 +1,13 @@
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1920, 1200]
+ transform: translate(-45, 7)
+ items:
+ - type: stacking-context
+ filters: [opacity(0.9)]
+ items:
+ - text: "This should be pixel aligned!"
+ origin: 416.543499 160.008325
+ size: 16
+
diff --git a/gfx/wr/wrench/reftests/snap/fractional-filter.yaml b/gfx/wr/wrench/reftests/snap/fractional-filter.yaml
new file mode 100644
index 0000000000..6b45682ad2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/fractional-filter.yaml
@@ -0,0 +1,14 @@
+# Verify that a fractional transform that is attached to an off-screen
+# surface is able to snap correctly
+root:
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 1920, 1200]
+ transform: translate(-45, 7.491675)
+ items:
+ - type: stacking-context
+ filters: [opacity(0.9)]
+ items:
+ - text: "This should be pixel aligned!"
+ origin: 416.543499 160.008325
+ size: 16
diff --git a/gfx/wr/wrench/reftests/snap/preserve-3d.png b/gfx/wr/wrench/reftests/snap/preserve-3d.png
new file mode 100644
index 0000000000..e02c30654c
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/preserve-3d.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/snap/preserve-3d.yaml b/gfx/wr/wrench/reftests/snap/preserve-3d.yaml
new file mode 100644
index 0000000000..133233d58b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/preserve-3d.yaml
@@ -0,0 +1,55 @@
+---
+root:
+ items:
+ -
+ bounds: [293, 139, 500, 500]
+ type: reference-frame
+ transform: scale(0.7)
+ items:
+ -
+ bounds: [0, 0, 500, 500]
+ type: stacking-context
+ perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.25416666, -0.23866667, 1, -0.00083333335, 0, 0, 0, 1]
+ "transform-style": preserve-3d
+ items:
+ -
+ bounds: [0, 0, 0, 0]
+ type: stacking-context
+ transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -110, 0, 0, 1]
+ items:
+ -
+ type: clip
+ id: 2
+ complex:
+ -
+ rect: [24, 539, 24, 24]
+ radius: [12, 12]
+ -
+ bounds: [24, 539, 24, 24]
+ type: rect
+ color: black
+ clip-chain: [2]
+ -
+ type: clip
+ id: 3
+ complex:
+ -
+ rect: [24, 770, 24, 24]
+ radius: [12, 12]
+ -
+ bounds: [24, 770, 24, 24]
+ type: rect
+ color: black
+ clip-chain: [3]
+ -
+ type: clip
+ id: 4
+ complex:
+ -
+ rect: [24, 847, 24, 24]
+ radius: [12, 12]
+ -
+ bounds: [24, 847, 24, 24]
+ type: rect
+ color: black
+ clip-chain: [4]
diff --git a/gfx/wr/wrench/reftests/snap/reftest.list b/gfx/wr/wrench/reftests/snap/reftest.list
new file mode 100644
index 0000000000..3464829f9b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/reftest.list
@@ -0,0 +1,6 @@
+platform(linux,mac) == snap.yaml snap.png
+== transform.yaml transform.png
+platform(linux,mac) == preserve-3d.yaml preserve-3d.png
+fuzzy(128,200) == subpixel-raster-root.yaml subpixel-raster-root-ref.yaml
+platform(linux,mac) == fractional-filter.yaml fractional-filter-ref.yaml
+max_surface_size(256) == 1761299.yaml 1761299.yaml
diff --git a/gfx/wr/wrench/reftests/snap/snap.png b/gfx/wr/wrench/reftests/snap/snap.png
new file mode 100644
index 0000000000..38f7cf33e5
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/snap.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/snap/snap.yaml b/gfx/wr/wrench/reftests/snap/snap.yaml
new file mode 100644
index 0000000000..f292a728a9
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/snap.yaml
@@ -0,0 +1,15 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [ 1, 1, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 10.4, 1.8, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 21.5, 1.5, 5, 5 ]
+ color: green
+ - type: rect
+ bounds: [ 31.2, 1.6, 4.3, 5.5 ]
+ color: green
diff --git a/gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml b/gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml
new file mode 100644
index 0000000000..8afe567788
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/subpixel-raster-root-ref.yaml
@@ -0,0 +1,7 @@
+---
+root:
+ items:
+ -
+ bounds: [0, 111, 200, 1]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml b/gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml
new file mode 100644
index 0000000000..494ec42334
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/subpixel-raster-root.yaml
@@ -0,0 +1,13 @@
+# Verify that we don't incorrectly snap surface rects with fractional pixel offsets
+---
+root:
+ items:
+ -
+ type: "stacking-context"
+ transform: translate(0, 100.5, 0)
+ transform-style: preserve-3d
+ items:
+ -
+ bounds: [0, 10.5, 200, 1]
+ type: rect
+ color: green
diff --git a/gfx/wr/wrench/reftests/snap/transform.png b/gfx/wr/wrench/reftests/snap/transform.png
new file mode 100644
index 0000000000..73c8feacdf
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/transform.png
Binary files differ
diff --git a/gfx/wr/wrench/reftests/snap/transform.yaml b/gfx/wr/wrench/reftests/snap/transform.yaml
new file mode 100644
index 0000000000..d1b0579eda
--- /dev/null
+++ b/gfx/wr/wrench/reftests/snap/transform.yaml
@@ -0,0 +1,19 @@
+---
+root:
+ items:
+ # 45 degrees result in middle -+ 14.142, rounded to 14
+ - type: stacking-context
+ bounds: [0, 0, 60, 60]
+ transform: rotate-y(45)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 40, 40 ]
+ color: blue
+ # 50 degrees result in middle -+ 12.856, rounded to 13
+ - type: stacking-context
+ bounds: [50, 0, 60, 60]
+ transform: rotate-x(50)
+ items:
+ - type: rect
+ bounds: [ 10, 10, 40, 40 ]
+ color: blue