Bug 1431582 - Add reduced test case for 3d transform bugs. r=kvark a=test-only
authorAndrew Osmond <aosmond@mozilla.com>
Mon, 28 Jan 2019 15:43:58 -0500
changeset 515646 8f2ea35d460169b553a44f269b8357037ad51cbc
parent 515645 0419384222dc56ac89a19062ad62d20749f9d337
child 515647 dc3e444e4a2ced7aeee4164899ef93c78582381e
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskvark, test-only
bugs1431582
milestone66.0
Bug 1431582 - Add reduced test case for 3d transform bugs. r=kvark a=test-only Differential Revision: https://phabricator.services.mozilla.com/D17864
gfx/wr/wrench/reftests/split/gradient-ref.yaml
gfx/wr/wrench/reftests/split/gradient.yaml
gfx/wr/wrench/reftests/split/reftest.list
new file mode 100644
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/gradient-ref.yaml
@@ -0,0 +1,39 @@
+# Checks the UV interpolation of a preserved 3d stacking context matches
+# a flat stacking context. There are four black rectangles that overlap
+# the edges of the transformed gradient to minimize fuzz.
+---
+root:
+  items:
+    - type: "reference-frame"
+      bounds: [0, 0, 2746, 1408]
+      transform-style: flat
+      perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.4699999988079071, -0.44999998807907104, 1, -0.0012499999720603228, 176, 160, 0, 1]
+      items:
+        - type: "reference-frame"
+          bounds: [0, 0, 2746, 1408]
+          transform-style: flat
+          transform: rotate-y(-53)
+          items:
+            - type: "stacking-context"
+              transform-style: flat
+              items:
+                - type: rect
+                  bounds: [0, 0, 300, 300]
+                  color: 255 255 255 1.0000
+                - type: gradient
+                  bounds: [0, 0, 300, 150]
+                  start: [150, 0]
+                  end: [150, 150]
+                  stops: [0.0, [255, 0, 0, 1], 1.0, [254, 0, 0, 1]]
+    - type: rect
+      bounds: [520, 260, 120, 20]
+      color: 0 0 0 1.0000
+    - type: rect
+      bounds: [520, 336, 120, 3]
+      color: 0 0 0 1.0000
+    - type: rect
+      bounds: [520, 260, 10, 80]
+      color: 0 0 0 1.0000
+    - type: rect
+      bounds: [622, 260, 10, 80]
+      color: 0 0 0 1.0000
new file mode 100644
--- /dev/null
+++ b/gfx/wr/wrench/reftests/split/gradient.yaml
@@ -0,0 +1,42 @@
+# Checks the UV interpolation of a preserved 3d stacking context matches
+# a flat stacking context. There are four black rectangles that overlap
+# the edges of the transformed gradient to minimize fuzz.
+---
+root:
+  items:
+    - type: "reference-frame"
+      bounds: [0, 0, 2746, 1408]
+      transform-style: preserve-3d
+      perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.4699999988079071, -0.44999998807907104, 1, -0.0012499999720603228, 176, 160, 0, 1]
+      items:
+        - type: "reference-frame"
+          bounds: [0, 0, 2746, 1408]
+          transform-style: preserve-3d
+          transform: rotate-y(-53)
+          items:
+            - type: "stacking-context"
+              transform-style: preserve-3d
+              items:
+                - type: "stacking-context"
+                  transform-style: flat
+                  items:
+                    - type: rect
+                      bounds: [0, 0, 300, 300]
+                      color: 255 255 255 1.0000
+                    - type: gradient
+                      bounds: [0, 0, 300, 150]
+                      start: [150, 0]
+                      end: [150, 150]
+                      stops: [0.0, [255, 0, 0, 1], 1.0, [254, 0, 0, 1]]
+    - type: rect
+      bounds: [520, 260, 120, 20]
+      color: 0 0 0 1.0000
+    - type: rect
+      bounds: [520, 336, 120, 3]
+      color: 0 0 0 1.0000
+    - type: rect
+      bounds: [520, 260, 10, 80]
+      color: 0 0 0 1.0000
+    - type: rect
+      bounds: [622, 260, 10, 80]
+      color: 0 0 0 1.0000
--- a/gfx/wr/wrench/reftests/split/reftest.list
+++ b/gfx/wr/wrench/reftests/split/reftest.list
@@ -11,8 +11,9 @@
 fuzzy(1,20) == near-plane.yaml near-plane.png
 # Note: on windows the image is rendered at a slightly different spot.
 # similarly, a lot of tests in "transform" are non-windows. TODO: investigate
 platform(linux,mac) fuzzy(1,20) == same-plane.yaml same-plane.png
 #TODO: https://github.com/servo/webrender/issues/2946
 #== cross.yaml cross-ref.yaml
 == mixed-order.yaml mixed-order-ref.yaml
 fuzzy(1,40000) == filter.yaml filter-ref.yaml
+#fuzzy(1,10000) == gradient.yaml gradient-ref.yaml