diff options
Diffstat (limited to 'gfx/wr/wrench/reftests/split')
35 files changed, 732 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/split/cross-ref.yaml b/gfx/wr/wrench/reftests/split/cross-ref.yaml new file mode 100644 index 0000000000..c784e62fce --- /dev/null +++ b/gfx/wr/wrench/reftests/split/cross-ref.yaml @@ -0,0 +1,36 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 200] + items: + - type: stacking-context + bounds: [0, 0, 100, 200] + transform: rotate-y(-45) rotate-x(45) + items: + - type: rect + bounds: [0, 0, 50, 100] + color: green + - type: stacking-context + bounds: [0, 0, 100, 200] + transform: rotate-y(45) rotate-x(45) + items: + - type: rect + bounds: [0, 0, 50, 100] + color: red + - type: stacking-context + bounds: [0, 0, 100, 200] + transform: rotate-y(45) rotate-x(45) + items: + - type: rect + bounds: [50, 0, 50, 100] + color: red + - type: stacking-context + bounds: [0, 0, 100, 200] + transform: rotate-y(-45) rotate-x(45) + items: + - type: rect + bounds: [50, 0, 50, 100] + color: green + + diff --git a/gfx/wr/wrench/reftests/split/cross.yaml b/gfx/wr/wrench/reftests/split/cross.yaml new file mode 100644 index 0000000000..e306dbad33 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/cross.yaml @@ -0,0 +1,24 @@ +# Crossed planes test. Similar to "simple" but has more complex transformations, +# which puts higher requirements on the precision of arithmetics, +# and all 4 pieces are visible on screen. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 200] + transform-style: preserve-3d + items: + - type: stacking-context + bounds: [0, 0, 100, 200] + transform: rotate-y(45) rotate-x(45) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: red + - type: stacking-context + bounds: [0, 0, 100, 200] + transform: rotate-y(-45) rotate-x(45) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: green diff --git a/gfx/wr/wrench/reftests/split/filter-ref.yaml b/gfx/wr/wrench/reftests/split/filter-ref.yaml new file mode 100644 index 0000000000..01e16b6e8f --- /dev/null +++ b/gfx/wr/wrench/reftests/split/filter-ref.yaml @@ -0,0 +1,10 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 200, 200] + transform-style: preserve-3d + items: + - type: rect + bounds: [0, 0, 200, 200] + color: [255, 0, 0, 0.5] diff --git a/gfx/wr/wrench/reftests/split/filter.yaml b/gfx/wr/wrench/reftests/split/filter.yaml new file mode 100644 index 0000000000..54667c0652 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/filter.yaml @@ -0,0 +1,21 @@ +# This test ensures that an opacity filter forces the flattening of preserve-3D context. +# The innermost rectangle has backface visibility disabled. If the parent stacking context +# is a part of preserve-3D hierarchy, then the item would be backward-facing, thus invisible. +# With the opacity filter, it's no longer a part of the preserve-3D, thus visible. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 200, 200] + transform-style: preserve-3d + transform: rotate-y(180) + items: + - type: stacking-context + bounds: [0, 0, 200, 200] + transform-style: preserve-3d + filters: [opacity(0.5)] + items: + - type: rect + bounds: [0, 0, 200, 200] + color: red + backface-visible: false diff --git a/gfx/wr/wrench/reftests/split/gradient-ref.yaml b/gfx/wr/wrench/reftests/split/gradient-ref.yaml new file mode 100644 index 0000000000..5a461c737d --- /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 diff --git a/gfx/wr/wrench/reftests/split/gradient.yaml b/gfx/wr/wrench/reftests/split/gradient.yaml new file mode 100644 index 0000000000..8da777df03 --- /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 diff --git a/gfx/wr/wrench/reftests/split/intermediate-1-ref.yaml b/gfx/wr/wrench/reftests/split/intermediate-1-ref.yaml new file mode 100644 index 0000000000..2d67df4ead --- /dev/null +++ b/gfx/wr/wrench/reftests/split/intermediate-1-ref.yaml @@ -0,0 +1,12 @@ +--- +root: + items: + - type: rect + bounds: 8 36 100 100 + color: green + - type: rect + bounds: 108 36 100 100 + color: blue + - type: rect + bounds: 208 36 100 100 + color: yellow diff --git a/gfx/wr/wrench/reftests/split/intermediate-1.yaml b/gfx/wr/wrench/reftests/split/intermediate-1.yaml new file mode 100644 index 0000000000..0c02fe8e3c --- /dev/null +++ b/gfx/wr/wrench/reftests/split/intermediate-1.yaml @@ -0,0 +1,38 @@ +--- +root: + items: + - type: rect + bounds: 8 36 300 100 + color: red + - type: stacking-context + transform-style: preserve-3d + transform: translate(8, 36, 0) + items: + - type: stacking-context + transform-style: preserve-3d + items: + - type: rect + bounds: 0 0 100 100 + color: green + - type: stacking-context # flat, intermediate surface + items: + - type: stacking-context + transform: translate(100, 0, 0) + transform-style: preserve-3d + items: + - type: stacking-context + transform-style: preserve-3d + items: + - type: rect + bounds: 0 0 100 100 + color: blue + - type: stacking-context + transform: translate(100, 0, 0) + transform-style: preserve-3d + items: + - type: stacking-context + transform-style: preserve-3d + items: + - type: rect + bounds: 0 0 100 100 + color: yellow diff --git a/gfx/wr/wrench/reftests/split/intermediate-2.yaml b/gfx/wr/wrench/reftests/split/intermediate-2.yaml new file mode 100644 index 0000000000..7d926ade4a --- /dev/null +++ b/gfx/wr/wrench/reftests/split/intermediate-2.yaml @@ -0,0 +1,34 @@ +--- +root: + items: + - type: rect + bounds: 8 36 300 100 + color: red + - type: stacking-context + transform-style: preserve-3d + transform: translate(8, 36, 0) + items: + - type: stacking-context + transform-style: preserve-3d + items: + - type: rect + bounds: 0 0 100 100 + color: green + - type: stacking-context + items: + - type: stacking-context + transform: translate(100, 0, 0) + items: + - type: rect + bounds: 0 0 100 100 + color: blue + - type: stacking-context + transform: translate(100, 0, 0) + transform-style: preserve-3d + items: + - type: stacking-context + transform-style: preserve-3d + items: + - type: rect + bounds: 0 0 100 100 + color: yellow diff --git a/gfx/wr/wrench/reftests/split/mixed-order-ref.yaml b/gfx/wr/wrench/reftests/split/mixed-order-ref.yaml new file mode 100644 index 0000000000..e3632665c0 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/mixed-order-ref.yaml @@ -0,0 +1,22 @@ +# The result should be matching the flat ordering, since there +# is no variation in Z of the preserve-3D children. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 200, 200] + transform: rotate-x(30) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: green + - type: stacking-context + bounds: [25, 25, 100, 100] + #transform: rotate-z(45) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: red + - type: rect + bounds: [100, 0, 100, 100] + color: blue diff --git a/gfx/wr/wrench/reftests/split/mixed-order.yaml b/gfx/wr/wrench/reftests/split/mixed-order.yaml new file mode 100644 index 0000000000..789621dc5b --- /dev/null +++ b/gfx/wr/wrench/reftests/split/mixed-order.yaml @@ -0,0 +1,25 @@ +# The "preserve-3d" context has a mix of children being other stacking contexts and +# just primitives. The other stacking contexts are also "preserve-3d" but on the same plane, +# so the result ordering should be exactly matching the way we specify the children. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 200, 200] + transform-style: preserve-3d + transform: rotate-x(30) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: green + - type: stacking-context + bounds: [25, 25, 100, 100] + #TODO: https://github.com/servo/webrender/issues/2946 + #transform: rotate-z(45) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: red + - type: rect + bounds: [100, 0, 100, 100] + color: blue diff --git a/gfx/wr/wrench/reftests/split/near-plane.png b/gfx/wr/wrench/reftests/split/near-plane.png Binary files differnew file mode 100644 index 0000000000..c6e81c9983 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/near-plane.png diff --git a/gfx/wr/wrench/reftests/split/near-plane.yaml b/gfx/wr/wrench/reftests/split/near-plane.yaml new file mode 100644 index 0000000000..f1911674ca --- /dev/null +++ b/gfx/wr/wrench/reftests/split/near-plane.yaml @@ -0,0 +1,16 @@ +# In this test, there is a single polygon intersecting the near plane. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 600, 600] + transform-style: preserve-3d + perspective: 200 + items: + - type: stacking-context + bounds: [0, 0, 600, 600] + transform: rotate-x(-60.0) + items: + - type: rect + bounds: [000, 0, 600, 600] + color: [255, 0, 0, 0.5] diff --git a/gfx/wr/wrench/reftests/split/nested-coord-systems-ref.yaml b/gfx/wr/wrench/reftests/split/nested-coord-systems-ref.yaml new file mode 100644 index 0000000000..97e2e82fc5 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/nested-coord-systems-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - type: rect + bounds: 0 0 150 200 + color: green diff --git a/gfx/wr/wrench/reftests/split/nested-coord-systems.yaml b/gfx/wr/wrench/reftests/split/nested-coord-systems.yaml new file mode 100644 index 0000000000..5cdc4ab634 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/nested-coord-systems.yaml @@ -0,0 +1,28 @@ +# This test checks our ability to have the plane splitting root itself to be rasterized +# in some local space. Perspective transform forces WR to use the local space. +--- +root: + items: + - type: stacking-context + bounds: 0 0 400 400 + transform-style: preserve-3d + items: + - type: stacking-context + bounds: 0 0 400 400 + transform-style: flat + transform: perspective(100) rotate-y(30) + transform-origin: 0 0 + items: + - type: stacking-context + bounds: 0 0 400 400 + transform-style: preserve-3d + items: + - type: stacking-context + bounds: 0 0 400 400 + transform-style: flat + transform: perspective(100) rotate-y(30) + transform-origin: 0 0 + items: + - type: rect + bounds: 0 0 200 200 + color: green diff --git a/gfx/wr/wrench/reftests/split/nested-preserve3d-crash.yaml b/gfx/wr/wrench/reftests/split/nested-preserve3d-crash.yaml new file mode 100644 index 0000000000..68a01ebeb1 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/nested-preserve3d-crash.yaml @@ -0,0 +1,37 @@ +--- +root: + items: + - type: stacking-context + bounds: 0 0 1024 768 + items: + - type: stacking-context + bounds: 0 0 1024 768 + transform-style: preserve-3d + transform: rotate-x(180) + items: + - type: stacking-context + bounds: 0 0 1024 768 + items: + - type: rect + bounds: 0 0 200 200 + color: green + - type: stacking-context + bounds: 0 0 1024 768 + items: + - type: rect + bounds: 0 0 200 200 + color: green + - type: stacking-context + bounds: 0 0 1024 768 + transform-style: preserve-3d + transform: rotate-x(180) + items: + - type: rect + bounds: 0 0 200 200 + color: green + - type: stacking-context + bounds: 0 0 1024 768 + items: + - type: rect + bounds: 0 0 200 200 + color: green diff --git a/gfx/wr/wrench/reftests/split/nested-ref.yaml b/gfx/wr/wrench/reftests/split/nested-ref.yaml new file mode 100644 index 0000000000..798b624356 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/nested-ref.yaml @@ -0,0 +1,12 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 1024, 1024] + items: + - type: rect + bounds: [150, 0, 300, 600] + color: red + - type: rect + bounds: [150, 0, 300, 200] + color: green diff --git a/gfx/wr/wrench/reftests/split/nested.yaml b/gfx/wr/wrench/reftests/split/nested.yaml new file mode 100644 index 0000000000..5b93224fda --- /dev/null +++ b/gfx/wr/wrench/reftests/split/nested.yaml @@ -0,0 +1,25 @@ +# This tests have a non-preserve3d stacking context nested within +# preserve-3d sub-tree. This nested context is still getting baked in +# and participates (as a whole) in plane splitting. +# It is layed out in the same plane as the parent, so should be ordered +# last, given that it's coming later than the parent. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 1024, 1024] + items: + - type: stacking-context + bounds: [0, 0, 600, 600] + transform-style: preserve-3d + transform: rotate-y(60.0) + items: + - type: rect + bounds: [0, 0, 600, 600] + color: red + - type: stacking-context + bounds: [0, 0, 100, 100] + items: + - type: rect + bounds: [0, 0, 600, 200] + color: green diff --git a/gfx/wr/wrench/reftests/split/order-1-ref.yaml b/gfx/wr/wrench/reftests/split/order-1-ref.yaml new file mode 100644 index 0000000000..930ac5c8b9 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/order-1-ref.yaml @@ -0,0 +1,8 @@ +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + items: + - type: rect + bounds: [0, 0, 100, 100] + color: green diff --git a/gfx/wr/wrench/reftests/split/order-1.yaml b/gfx/wr/wrench/reftests/split/order-1.yaml new file mode 100644 index 0000000000..7b5613f6d3 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/order-1.yaml @@ -0,0 +1,20 @@ +# The "preserve-3d" context has a "flat" child. Rotation by 180 degrees and positive Z offset +# should compensate each other, resulting in a green rectangle. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + transform-style: preserve-3d + transform: rotate-x(180) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: green + - type: stacking-context + bounds: [0, 0, 100, 100] + transform: translate(0, 0, 10) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: red diff --git a/gfx/wr/wrench/reftests/split/order-2-ref.yaml b/gfx/wr/wrench/reftests/split/order-2-ref.yaml new file mode 100644 index 0000000000..930ac5c8b9 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/order-2-ref.yaml @@ -0,0 +1,8 @@ +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + items: + - type: rect + bounds: [0, 0, 100, 100] + color: green diff --git a/gfx/wr/wrench/reftests/split/order-2.yaml b/gfx/wr/wrench/reftests/split/order-2.yaml new file mode 100644 index 0000000000..a94d25b8f1 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/order-2.yaml @@ -0,0 +1,27 @@ +# The "preserve-3d" context has a "flat" child, which contains two other stacking contexts +# that have their Z modified. The Z should not affect their drawing order, since they +# are hidden from the 3D hierarchy by the flat parent. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + transform-style: preserve-3d + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + transform: translate(0, 0, 10) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: red + - type: stacking-context + bounds: [0, 0, 100, 100] + transform: translate(0, 0, -10) + items: + - type: rect + bounds: [0, 0, 100, 100] + color: green diff --git a/gfx/wr/wrench/reftests/split/order-3-ref.yaml b/gfx/wr/wrench/reftests/split/order-3-ref.yaml new file mode 100644 index 0000000000..9d896d9699 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/order-3-ref.yaml @@ -0,0 +1,15 @@ +--- +root: + items: + - + type: rect + bounds: [8, 8, 200, 200] + color: blue + - + type: rect + bounds: [8, 208, 200, 200] + color: blue + - + type: rect + bounds: [8, 408, 200, 200] + color: blue diff --git a/gfx/wr/wrench/reftests/split/order-3.yaml b/gfx/wr/wrench/reftests/split/order-3.yaml new file mode 100644 index 0000000000..7f80652af6 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/order-3.yaml @@ -0,0 +1,31 @@ +# Ensure that preserve-3d items are correctly batched with transparent siblings. +--- +root: + items: + - + type: stacking-context + transform-style: "preserve-3d" + items: + - + type: rect + bounds: [8, 8, 200, 200] + color: blue + - + type: stacking-context + transform-style: "preserve-3d" + items: + - + type: rect + bounds: [8, 208, 200, 200] + color: blue + - type: rect + color: [255, 0, 0, 0.5] + bounds: [8, 408, 200, 200] + - + type: stacking-context + transform-style: "preserve-3d" + items: + - + type: rect + bounds: [8, 408, 200, 200] + color: blue diff --git a/gfx/wr/wrench/reftests/split/ordering-ref.yaml b/gfx/wr/wrench/reftests/split/ordering-ref.yaml new file mode 100644 index 0000000000..33ad571660 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/ordering-ref.yaml @@ -0,0 +1,15 @@ +--- +root: + items: + - + bounds: [15, 15, 150, 300] + type: rect + color: 255 0 0 1.0000 + - + bounds: [203, 15, 150, 300] + type: rect + color: 255 0 0 1.0000 + - + bounds: [0, 0, 450, 150] + type: rect + color: 0 0 0 0.6667 diff --git a/gfx/wr/wrench/reftests/split/ordering.yaml b/gfx/wr/wrench/reftests/split/ordering.yaml new file mode 100644 index 0000000000..2809166454 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/ordering.yaml @@ -0,0 +1,25 @@ +--- +root: + items: + - + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 15, 0, 1] + "transform-style": "preserve-3d" + items: + - + perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.05, -0.1, 1, -0.00066666666, 0, 0, 0, 1] + type: "stacking-context" + "transform-style": "preserve-3d" + items: + - + bounds: [0, 0, 150, 300] + type: rect + color: 255 0 0 1.0000 + - + bounds: [203, 15, 150, 300] + type: rect + color: 255 0 0 1.0000 + - + bounds: [0, 0, 450, 150] + type: rect + color: 0 0 0 0.6667 diff --git a/gfx/wr/wrench/reftests/split/perspective-clipping-ref.yaml b/gfx/wr/wrench/reftests/split/perspective-clipping-ref.yaml new file mode 100644 index 0000000000..8f6d4a1566 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/perspective-clipping-ref.yaml @@ -0,0 +1,9 @@ +--- +root: + items: + - type: stacking-context + bounds: 0 0 1024 768 + items: + - type: rect + bounds: 0 0 1024 768 + color: green diff --git a/gfx/wr/wrench/reftests/split/perspective-clipping.yaml b/gfx/wr/wrench/reftests/split/perspective-clipping.yaml new file mode 100644 index 0000000000..7135f27c37 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/perspective-clipping.yaml @@ -0,0 +1,23 @@ +--- +root: + items: + - type: stacking-context + bounds: 0 0 1024 768 + items: + - type: rect + bounds: 0 0 1024 768 + color: red + - type: stacking-context + bounds: 0 0 1024 768 + transform-style: preserve-3d + perspective: 300 + perspective-origin: 0 0 + items: + - type: stacking-context + bounds: 0 0 1024 768 + # translate-Z(-300) scale(2) + transform: 2 0 0 0 0 2 0 0 0 0 2 0 0 0 -300 1 + items: + - type: rect + bounds: 0 0 1024 768 + color: green diff --git a/gfx/wr/wrench/reftests/split/reftest.list b/gfx/wr/wrench/reftests/split/reftest.list new file mode 100644 index 0000000000..cd9b33c02b --- /dev/null +++ b/gfx/wr/wrench/reftests/split/reftest.list @@ -0,0 +1,22 @@ +fuzzy-if(platform(swgl),1,180000) == simple.yaml simple-ref.yaml +== order-1.yaml order-1-ref.yaml +== order-2.yaml order-2-ref.yaml +== nested.yaml nested-ref.yaml +# fuzziness is needed due to perspective for the edge +fuzzy(35,200) == nested-coord-systems.yaml nested-coord-systems-ref.yaml +== nested-preserve3d-crash.yaml nested-preserve3d-crash.yaml +== perspective-clipping.yaml perspective-clipping-ref.yaml +== intermediate-1.yaml intermediate-1-ref.yaml +== intermediate-2.yaml intermediate-1-ref.yaml +== split-intersect1.yaml split-intersect1-ref.yaml +== ordering.yaml ordering-ref.yaml +fuzzy(1,20) fuzzy-if(platform(swgl),128,39) == 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 +== order-3.yaml order-3-ref.yaml diff --git a/gfx/wr/wrench/reftests/split/same-plane.png b/gfx/wr/wrench/reftests/split/same-plane.png Binary files differnew file mode 100644 index 0000000000..3d5baf998f --- /dev/null +++ b/gfx/wr/wrench/reftests/split/same-plane.png diff --git a/gfx/wr/wrench/reftests/split/same-plane.yaml b/gfx/wr/wrench/reftests/split/same-plane.yaml new file mode 100644 index 0000000000..277709bad1 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/same-plane.yaml @@ -0,0 +1,33 @@ +# This test has a number of rectangles placed on the same transformed preserve3d plane. +# The expected result is that the rectangles are rendered in the order they are listed. +# This can fail if the primitives are considered outside of the main plane due +# to floating point precision issues in plane-splitting and transformation. +--- +root: + items: + - type: "stacking-context" + transform-style: preserve-3d + transform: rotate-y(-30) rotate-x(-75) translate(-100, 100, 0) + items: + - type: "stacking-context" + perspective: 400 + transform-style: preserve-3d + items: + - type: rect + bounds: [0, 0, 450, 300] + color: 0 255 0 1.0000 + - type: stacking-context + bounds: [0, 0, 600, 600] + transform: translate(200, 0, 0) + items: + - type: rect + bounds: [-200, 0, 150, 300] + color: 255 0 0 1.0000 + - type: stacking-context + bounds: [0, 0, 600, 600] + transform: rotate-z(-90) + items: + - + bounds: [0, 200, 150, 200] + type: rect + color: 0 0 255 1.0000 diff --git a/gfx/wr/wrench/reftests/split/simple-ref.yaml b/gfx/wr/wrench/reftests/split/simple-ref.yaml new file mode 100644 index 0000000000..de1fad9440 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/simple-ref.yaml @@ -0,0 +1,12 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 1024, 1024] + items: + - type: rect + bounds: [150, 0, 150, 600] + color: [191, 127, 63] + - type: rect + bounds: [300, 0, 150, 600] + color: [127, 191, 63] diff --git a/gfx/wr/wrench/reftests/split/simple.yaml b/gfx/wr/wrench/reftests/split/simple.yaml new file mode 100644 index 0000000000..b6445780f5 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/simple.yaml @@ -0,0 +1,24 @@ +# This tests a simple intersection of 2 rotated planes to split properly. +# If the split doesn't happen, we see a single-colored rectangle. +# If it does, the rectangle gets split vertically in 2 parts of different colors. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 1024, 1024] + transform-style: preserve-3d + items: + - type: stacking-context + bounds: [0, 0, 600, 600] + transform: rotate-y(-60.0) + items: + - type: rect + bounds: [0, 0, 600, 600] + color: [255, 0, 0, 0.5] + - type: stacking-context + bounds: [0, 0, 600, 600] + transform: rotate-y(60.0) + items: + - type: rect + bounds: [0, 0, 600, 600] + color: [0, 255, 0, 0.5] diff --git a/gfx/wr/wrench/reftests/split/split-intersect1-ref.yaml b/gfx/wr/wrench/reftests/split/split-intersect1-ref.yaml new file mode 100644 index 0000000000..134698571c --- /dev/null +++ b/gfx/wr/wrench/reftests/split/split-intersect1-ref.yaml @@ -0,0 +1,15 @@ +--- +root: + items: + - type: stacking-context + items: + - type: stacking-context + items: + - type: rect + bounds: 50 0 50 100 + color: red + - type: stacking-context + items: + - type: rect + bounds: 0 0 50 100 + color: green diff --git a/gfx/wr/wrench/reftests/split/split-intersect1.yaml b/gfx/wr/wrench/reftests/split/split-intersect1.yaml new file mode 100644 index 0000000000..dff7638707 --- /dev/null +++ b/gfx/wr/wrench/reftests/split/split-intersect1.yaml @@ -0,0 +1,18 @@ +--- +root: + items: + - type: stacking-context + transform-style: preserve-3d + items: + - type: stacking-context + items: + - type: rect + bounds: 0 0 100 100 + color: red + - type: stacking-context + transform: rotate-y(-0.1) + bounds: 0 0 100 100 + items: + - type: rect + bounds: 0 0 100 100 + color: green |