diff options
Diffstat (limited to '')
15 files changed, 226 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml b/gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml new file mode 100644 index 0000000000..1a7be55eae --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-3d-leaf.yaml @@ -0,0 +1,18 @@ +# In this test, the leaf green rectangle has only its back visible +# due to rotate-x(180) transformation, preserve-3d style, +# and "backface-visible = false", so it's completely hidden. +--- +root: + items: + - type: rect + color: red + bounds: 0 0 1024 768 + - 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 + backface-visible: false diff --git a/gfx/wr/wrench/reftests/backface/backface-both-sides-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-both-sides-ref.yaml new file mode 100644 index 0000000000..aa0bd8e57c --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-both-sides-ref.yaml @@ -0,0 +1,8 @@ +--- +root: + items: + - type: stacking-context + items: + - type: rect + color: red + bounds: 100 0 100 100 diff --git a/gfx/wr/wrench/reftests/backface/backface-both-sides.yaml b/gfx/wr/wrench/reftests/backface/backface-both-sides.yaml new file mode 100644 index 0000000000..0212c3002d --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-both-sides.yaml @@ -0,0 +1,25 @@ +# In this test, both rectangles have invisible back faces and are +# parented to a preserve-3d context that is rotated by 180 degrees. +# The red one is also rotated 180 degrees, and should be visible. +--- +root: + items: + - type: stacking-context + items: + - type: stacking-context + transform: rotate-y(180) + transform-style: preserve-3d + transform-origin: 50 50 + items: + - type: rect + color: green + bounds: 0 0 100 100 + backface-visible: false + - type: stacking-context + transform: rotate-y(180) + transform-origin: 0 0 + backface-visible: false + items: + - type: rect + color: red + bounds: 0 0 100 100 diff --git a/gfx/wr/wrench/reftests/backface/backface-double-flip.yaml b/gfx/wr/wrench/reftests/backface/backface-double-flip.yaml new file mode 100644 index 0000000000..b242e95627 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-double-flip.yaml @@ -0,0 +1,21 @@ +# In this test, the red rectangle has backface visibility turned off. +# However its world transformation makes it front-facing. +# However it's still invisible because it's back-facing in the picture space +# of the transformed stacking context. +--- +root: + items: + - type: stacking-context + items: + - type: stacking-context + transform: rotate-y(180) + transform-style: preserve-3d + transform-origin: 50 50 + items: + - type: stacking-context + transform: rotate-y(180) + items: + - type: rect + color: red + backface-visible: false + bounds: 0 0 100 100 diff --git a/gfx/wr/wrench/reftests/backface/backface-flatten.yaml b/gfx/wr/wrench/reftests/backface/backface-flatten.yaml new file mode 100644 index 0000000000..e754d45bc9 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-flatten.yaml @@ -0,0 +1,31 @@ +# In this test, there is a flattened ref frame between an element +# and the picture it's rendered into. The element should be considered +# invisible as it's back face oriented at this flattening step. +# If WR only checks the "final" transform, it will consider it visible. + +--- +root: + transform: rotate-x(1) + items: + - type: stacking-context + transform-style: preserve-3d + #transform: rotate-x(1) + items: + - type: stacking-context + bounds: 0 0 200 200 + transform: rotate-y(30) + transform-style: flat + items: + - type: stacking-context + bounds: 0 0 200 200 + transform: rotate-y(-100) + transform-style: preserve-3d + items: + - type: stacking-context + #transform: rotate-x(1) + transform-style: flat + items: + - type: rect + bounds: 0 0 200 200 + color: green + backface-visible: false diff --git a/gfx/wr/wrench/reftests/backface/backface-hidden.yaml b/gfx/wr/wrench/reftests/backface/backface-hidden.yaml new file mode 100644 index 0000000000..afa9d653b8 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-hidden.yaml @@ -0,0 +1,18 @@ +# In this test, the leaf green rectangle has only its back visible +# due to rotate-x(180) transformation, +# and "backface-visible = false", so it's completely hidden. +--- +root: + items: + - type: rect + color: red + bounds: 0 0 1024 768 + - type: stacking-context + bounds: 0 0 1024 768 + transform: rotate-x(180) + transform-style: preserve-3d + items: + - type: rect + bounds: 0 0 1024 768 + color: green + backface-visible: false diff --git a/gfx/wr/wrench/reftests/backface/backface-leaf-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-leaf-ref.yaml new file mode 100644 index 0000000000..17d39b4d61 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-leaf-ref.yaml @@ -0,0 +1,12 @@ +--- +root: + items: + - type: rect + color: red + bounds: 0 0 1024 768 + - type: stacking-context + bounds: 0 0 1024 768 + items: + - type: rect + bounds: 0 568 200 200 + color: green diff --git a/gfx/wr/wrench/reftests/backface/backface-leaf.yaml b/gfx/wr/wrench/reftests/backface/backface-leaf.yaml new file mode 100644 index 0000000000..d1c1b893be --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-leaf.yaml @@ -0,0 +1,16 @@ +# In this test, the leaf green rectangle "backface-visible = false" which is ignored +# because it doesn't have any transform, and it's not in preserve-3d context. +--- +root: + items: + - type: rect + color: red + bounds: 0 0 1024 768 + - type: stacking-context + bounds: 0 0 1024 768 + transform: rotate-x(180) + items: + - type: rect + bounds: 0 0 200 200 + color: green + backface-visible: false diff --git a/gfx/wr/wrench/reftests/backface/backface-picture-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-picture-ref.yaml new file mode 100644 index 0000000000..3013f72f20 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-picture-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - type: rect + color: red + bounds: 0 0 100 100 diff --git a/gfx/wr/wrench/reftests/backface/backface-picture.yaml b/gfx/wr/wrench/reftests/backface/backface-picture.yaml new file mode 100644 index 0000000000..189c23d5b5 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-picture.yaml @@ -0,0 +1,21 @@ +# In this test we ensure that "backface-visiblity" property +# is not inherited, and the red rect rotated by 180 degrees +# is still rendered. +--- +root: + items: + - type: stacking-context + items: + - type: stacking-context + transform-style: preserve-3d + backface-visible: false + items: + - type: stacking-context + transform: rotate-y(180) + transform-origin: 50 50 + items: + - type: stacking-context + items: + - type: rect + color: red + bounds: 0 0 100 100 diff --git a/gfx/wr/wrench/reftests/backface/backface-ref.yaml b/gfx/wr/wrench/reftests/backface/backface-ref.yaml new file mode 100644 index 0000000000..614cf5f465 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - type: rect + color: red + bounds: 0 0 1024 768 diff --git a/gfx/wr/wrench/reftests/backface/backface-sc.yaml b/gfx/wr/wrench/reftests/backface/backface-sc.yaml new file mode 100644 index 0000000000..350baca592 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-sc.yaml @@ -0,0 +1,17 @@ +# This test is similar to "backface-leaf.yaml" but with the whole +# stacking context (containing a green rect) turning invisible +# because of the "rotate-x(180)" transform. +--- +root: + items: + - type: rect + color: red + bounds: 0 0 1024 768 + - type: stacking-context + bounds: 0 0 1024 768 + transform: rotate-x(180) + backface-visible: false + items: + - type: rect + bounds: 0 0 200 200 + color: green diff --git a/gfx/wr/wrench/reftests/backface/backface-vis-3d.yaml b/gfx/wr/wrench/reftests/backface/backface-vis-3d.yaml new file mode 100644 index 0000000000..c58026a5cc --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/backface-vis-3d.yaml @@ -0,0 +1,16 @@ +# Verifies that a 3d context selects the correct reference (containing block) spatial node. +root: + items: + - type: stacking-context + bounds: 100 0 100 100 + transform: scale-x(-1) + items: + - type: stacking-context + bounds: 0 0 100 100 + transform: rotate-y(180) + transform-style: preserve-3d + items: + - type: rect + bounds: 0 0 100 100 + color: red + backface-visible: false diff --git a/gfx/wr/wrench/reftests/backface/blank.yaml b/gfx/wr/wrench/reftests/backface/blank.yaml new file mode 100644 index 0000000000..c4eb3ab673 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/blank.yaml @@ -0,0 +1,2 @@ +--- +root: diff --git a/gfx/wr/wrench/reftests/backface/reftest.list b/gfx/wr/wrench/reftests/backface/reftest.list new file mode 100644 index 0000000000..70ab29b4a4 --- /dev/null +++ b/gfx/wr/wrench/reftests/backface/reftest.list @@ -0,0 +1,9 @@ +== backface-leaf.yaml backface-leaf-ref.yaml +== backface-3d-leaf.yaml backface-ref.yaml +== backface-hidden.yaml backface-ref.yaml +== backface-sc.yaml backface-ref.yaml +== backface-picture.yaml backface-picture-ref.yaml +== backface-double-flip.yaml blank.yaml +== backface-both-sides.yaml backface-both-sides-ref.yaml +== backface-vis-3d.yaml blank.yaml +== backface-flatten.yaml blank.yaml |