summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wrench/reftests/compositor-surface
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/wr/wrench/reftests/compositor-surface')
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml18
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/basic.yaml22
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/blank.yaml2
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml17
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml11
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml15
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml17
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml20
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml15
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/reftest.list6
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml31
-rw-r--r--gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml39
12 files changed, 213 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml
new file mode 100644
index 0000000000..1a567dd9e6
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/basic-ref.yaml
@@ -0,0 +1,18 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 462, 462]
+ color: green
+ - type: rect
+ bounds: [125, 125, 312, 312]
+ color: [128, 128, 128, 0.5]
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [150, 150, 262, 262]
+ - type: rect
+ bounds: [200, 200, 162, 162]
+ color: [0, 0, 255, 0.5]
+ - text: "Subpixel AA Text"
+ origin: 80 100
+ size: 20
+ color: black
diff --git a/gfx/wr/wrench/reftests/compositor-surface/basic.yaml b/gfx/wr/wrench/reftests/compositor-surface/basic.yaml
new file mode 100644
index 0000000000..0ea9b8a394
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/basic.yaml
@@ -0,0 +1,22 @@
+# Test that basic functionality of non-opaque compositor surfaces
+# is blending correctly, and that subpixel AA is used outside the
+# compositor surface region.
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 462, 462]
+ color: green
+ - type: rect
+ bounds: [125, 125, 312, 312]
+ color: [128, 128, 128, 0.5]
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [150, 150, 262, 262]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [200, 200, 162, 162]
+ color: [0, 0, 255, 0.5]
+ - text: "Subpixel AA Text"
+ origin: 80 100
+ size: 20
+ color: black
diff --git a/gfx/wr/wrench/reftests/compositor-surface/blank.yaml b/gfx/wr/wrench/reftests/compositor-surface/blank.yaml
new file mode 100644
index 0000000000..c4eb3ab673
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/blank.yaml
@@ -0,0 +1,2 @@
+---
+root:
diff --git a/gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml b/gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml
new file mode 100644
index 0000000000..7cc2b77710
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/coord-systems.yaml
@@ -0,0 +1,17 @@
+# Regression test - ensure we don't crash when we encounter a
+# transform hierarchy that has different coordinate systems but
+# results in a final transform that is 2d-axis-aligned
+---
+root:
+ items:
+ - type: stacking-context
+ bounds: [50, 50, 262, 262]
+ transform: rotate(45)
+ items:
+ - type: stacking-context
+ bounds: [0, 0, 262, 262]
+ transform: rotate(-45)
+ items:
+ - image: checkerboard(2,16,16)
+ bounds: [0, 0, 262, 262]
+ prefer-compositor-surface: true
diff --git a/gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml
new file mode 100644
index 0000000000..c5475c9814
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay-ref.yaml
@@ -0,0 +1,11 @@
+---
+root:
+ items:
+ - image: checkerboard(2,16,16)
+ bounds: [50, 50, 262, 262]
+ - type: stacking-context
+ filters: [opacity(0.5)]
+ items:
+ - type: rect
+ bounds: [100, 100, 162, 162]
+ color: green
diff --git a/gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml
new file mode 100644
index 0000000000..514225363a
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/filter-overlay.yaml
@@ -0,0 +1,15 @@
+# Verify that an off-screen surface that is placed over top
+# of a compositor surface selects the correct sub-slice when
+# adding to command buffers.
+---
+root:
+ items:
+ - image: checkerboard(2,16,16)
+ bounds: [50, 50, 262, 262]
+ prefer-compositor-surface: true
+ - type: stacking-context
+ filters: [opacity(0.5)]
+ items:
+ - type: rect
+ bounds: [100, 100, 162, 162]
+ color: green
diff --git a/gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml
new file mode 100644
index 0000000000..c8ce2fb444
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/mix-blend-ref.yaml
@@ -0,0 +1,17 @@
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [50, 50, 362, 362]
+ color: green
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [100, 100, 262, 262]
+ - type: stacking-context
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [150, 150, 162, 162]
+ color: red
diff --git a/gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml b/gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml
new file mode 100644
index 0000000000..fb8afe312d
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/mix-blend.yaml
@@ -0,0 +1,20 @@
+# Verify that we don't promote compositor surfaces within a root level blend container,
+# as that can prevent correct blending with the compositor surface.
+---
+root:
+ items:
+ - type: stacking-context
+ blend-container: true
+ items:
+ - type: rect
+ bounds: [50, 50, 362, 362]
+ color: green
+ - image: transparent-checkerboard(2,16,16)
+ bounds: [100, 100, 262, 262]
+ prefer-compositor-surface: true
+ - type: stacking-context
+ mix-blend-mode: multiply
+ items:
+ - type: rect
+ bounds: [150, 150, 162, 162]
+ color: red
diff --git a/gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml b/gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml
new file mode 100644
index 0000000000..cfe73293d2
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/picture-passthrough.yaml
@@ -0,0 +1,15 @@
+# Ensure that compositor surfaces which exist in child pictures with
+# None for composite mode don't get promoted to a compositor surface,
+# as we don't currently account for these in `compositor_surface_count`.
+---
+root:
+ items:
+ - type: stacking-context
+ backdrop-root: true
+ items:
+ - type: backdrop-filter
+ bounds: 0 0 256 256
+ filters: invert(1)
+ - image: checkerboard(2,16,16)
+ bounds: [150, 150, 262, 262]
+ prefer-compositor-surface: true
diff --git a/gfx/wr/wrench/reftests/compositor-surface/reftest.list b/gfx/wr/wrench/reftests/compositor-surface/reftest.list
new file mode 100644
index 0000000000..a026a26b18
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/reftest.list
@@ -0,0 +1,6 @@
+skip_on(android) fuzzy(2,500) == basic.yaml basic-ref.yaml
+== too-many-surfaces.yaml too-many-surfaces-ref.yaml
+!= picture-passthrough.yaml blank.yaml
+fuzzy(2,1000) == mix-blend.yaml mix-blend-ref.yaml
+!= coord-systems.yaml blank.yaml
+fuzzy(2,2500) == filter-overlay.yaml filter-overlay-ref.yaml
diff --git a/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml
new file mode 100644
index 0000000000..00f9f7da6b
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces-ref.yaml
@@ -0,0 +1,31 @@
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 400, 88]
+ color: green
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [60, 60, 68, 68]
+ - type: rect
+ bounds: [55, 70, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [138, 60, 68, 68]
+ - type: rect
+ bounds: [55, 80, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [216, 60, 68, 68]
+ - type: rect
+ bounds: [55, 90, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [294, 60, 68, 68]
+ - type: rect
+ bounds: [55, 100, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [372, 60, 68, 68]
+ - type: rect
+ bounds: [55, 110, 390, 5]
+ color: [255, 0, 0, 0.9]
diff --git a/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml
new file mode 100644
index 0000000000..e5744ddedc
--- /dev/null
+++ b/gfx/wr/wrench/reftests/compositor-surface/too-many-surfaces.yaml
@@ -0,0 +1,39 @@
+# Test that when there are too many compositor surfaces present that
+# the additional compositor surfaces are correctly drawn as regular
+# primitives into picture cache content tiles.
+---
+root:
+ items:
+ - type: rect
+ bounds: [50, 50, 400, 88]
+ color: green
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [60, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 70, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [138, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 80, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [216, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 90, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [294, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 100, 390, 5]
+ color: [255, 0, 0, 0.9]
+ - image: transparent-checkerboard(2,8,8)
+ bounds: [372, 60, 68, 68]
+ prefer-compositor-surface: true
+ - type: rect
+ bounds: [55, 110, 390, 5]
+ color: [255, 0, 0, 0.9]