From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../transforms/big-axis-aligned-scale-ref.yaml | 6 ++ .../transforms/big-axis-aligned-scale.yaml | 10 +++ gfx/wr/wrench/reftests/transforms/blank.yaml | 2 + .../wrench/reftests/transforms/border-scale-2.png | Bin 0 -> 4234 bytes .../wrench/reftests/transforms/border-scale-2.yaml | 19 ++++++ .../wrench/reftests/transforms/border-scale-3.png | Bin 0 -> 4058 bytes .../wrench/reftests/transforms/border-scale-3.yaml | 19 ++++++ .../wrench/reftests/transforms/border-scale-4.png | Bin 0 -> 4064 bytes .../wrench/reftests/transforms/border-scale-4.yaml | 19 ++++++ gfx/wr/wrench/reftests/transforms/border-scale.png | Bin 0 -> 4879 bytes .../wrench/reftests/transforms/border-scale.yaml | 19 ++++++ gfx/wr/wrench/reftests/transforms/border-zoom.png | Bin 0 -> 26360 bytes gfx/wr/wrench/reftests/transforms/border-zoom.yaml | 22 +++++++ .../reftests/transforms/clip-translate-ref.yaml | 6 ++ .../wrench/reftests/transforms/clip-translate.yaml | 23 +++++++ .../reftests/transforms/complex-preserve-3d.yaml | 24 +++++++ .../transforms/computed-rotation-yflip.png | Bin 0 -> 36363 bytes .../transforms/computed-rotation-yflip.yaml | 17 +++++ .../wrench/reftests/transforms/content-offset.png | Bin 0 -> 2121 bytes .../wrench/reftests/transforms/content-offset.yaml | 18 ++++++ gfx/wr/wrench/reftests/transforms/coord-system.png | Bin 0 -> 3400 bytes .../wrench/reftests/transforms/coord-system.yaml | 24 +++++++ gfx/wr/wrench/reftests/transforms/firefox.png | Bin 0 -> 45376 bytes .../reftests/transforms/flatten-all-flat-ref.yaml | 18 ++++++ .../reftests/transforms/flatten-all-flat.yaml | 20 ++++++ .../transforms/flatten-preserve-3d-root-ref.yaml | 6 ++ .../transforms/flatten-preserve-3d-root.yaml | 23 +++++++ .../reftests/transforms/flatten-twice-ref.yaml | 6 ++ .../wrench/reftests/transforms/flatten-twice.yaml | 21 ++++++ .../reftests/transforms/image-rotated-clip.png | Bin 0 -> 3816 bytes .../reftests/transforms/image-rotated-clip.yaml | 19 ++++++ gfx/wr/wrench/reftests/transforms/image.png | Bin 0 -> 528 bytes .../reftests/transforms/large-raster-root.yaml | 14 ++++ gfx/wr/wrench/reftests/transforms/local-clip.png | Bin 0 -> 2167 bytes gfx/wr/wrench/reftests/transforms/local-clip.yaml | 26 ++++++++ .../wrench/reftests/transforms/near-plane-clip.png | Bin 0 -> 70226 bytes .../reftests/transforms/near-plane-clip.yaml | 18 ++++++ .../transforms/nested-local-scale-ref.yaml | 23 +++++++ .../reftests/transforms/nested-local-scale.yaml | 24 +++++++ .../reftests/transforms/nested-preserve-3d.png | Bin 0 -> 3793 bytes .../reftests/transforms/nested-preserve-3d.yaml | 28 ++++++++ .../reftests/transforms/nested-rotate-x-flat.png | Bin 0 -> 4539 bytes .../reftests/transforms/nested-rotate-x-flat.yaml | 27 ++++++++ .../wrench/reftests/transforms/nested-rotate-x.png | Bin 0 -> 3789 bytes .../reftests/transforms/nested-rotate-x.yaml | 27 ++++++++ .../transforms/non-inversible-world-rect.yaml | 23 +++++++ .../transforms/perspective-border-radius.png | Bin 0 -> 11471 bytes .../transforms/perspective-border-radius.yaml | 26 ++++++++ .../transforms/perspective-box-shadow-ref.yaml | 24 +++++++ .../transforms/perspective-box-shadow.yaml | 23 +++++++ .../reftests/transforms/perspective-clip-1.png | Bin 0 -> 2004 bytes .../reftests/transforms/perspective-clip-1.yaml | 30 +++++++++ .../reftests/transforms/perspective-clip.png | Bin 0 -> 17216 bytes .../reftests/transforms/perspective-clip.yaml | 27 ++++++++ .../reftests/transforms/perspective-mask.png | Bin 0 -> 2157 bytes .../reftests/transforms/perspective-mask.yaml | 24 +++++++ .../reftests/transforms/perspective-origin.png | Bin 0 -> 46673 bytes .../reftests/transforms/perspective-origin.yaml | 16 +++++ .../reftests/transforms/perspective-shadow.png | Bin 0 -> 9496 bytes .../reftests/transforms/perspective-shadow.yaml | 27 ++++++++ .../transforms/perspective-surface-scale.png | Bin 0 -> 40725 bytes .../transforms/perspective-surface-scale.yaml | 14 ++++ gfx/wr/wrench/reftests/transforms/perspective.png | Bin 0 -> 127232 bytes gfx/wr/wrench/reftests/transforms/perspective.yaml | 54 ++++++++++++++++ gfx/wr/wrench/reftests/transforms/prim-suite.png | Bin 0 -> 51496 bytes gfx/wr/wrench/reftests/transforms/prim-suite.yaml | 45 +++++++++++++ .../transforms/raster-root-huge-scale.yaml | 35 ++++++++++ .../transforms/raster-root-large-mask.yaml | 28 ++++++++ .../transforms/raster-root-scaling-2-ref.yaml | 11 ++++ .../reftests/transforms/raster-root-scaling-2.yaml | 20 ++++++ .../transforms/raster-root-scaling-ref.yaml | 10 +++ .../reftests/transforms/raster-root-scaling.yaml | 14 ++++ .../reftests/transforms/raster_root_A_8192.yaml | 26 ++++++++ .../reftests/transforms/raster_root_A_ref.yaml | 26 ++++++++ .../reftests/transforms/raster_root_B_8192.yaml | 14 ++++ .../reftests/transforms/raster_root_B_ref.yaml | 14 ++++ gfx/wr/wrench/reftests/transforms/reftest.list | 59 +++++++++++++++++ .../reftests/transforms/rotate-clip-ref.yaml | 7 ++ gfx/wr/wrench/reftests/transforms/rotate-clip.yaml | 19 ++++++ .../reftests/transforms/rotated-clip-large.png | Bin 0 -> 7183 bytes .../reftests/transforms/rotated-clip-large.yaml | 17 +++++ gfx/wr/wrench/reftests/transforms/rotated-clip.png | Bin 0 -> 3767 bytes .../wrench/reftests/transforms/rotated-clip.yaml | 17 +++++ .../wrench/reftests/transforms/rotated-image.png | Bin 0 -> 7396 bytes .../wrench/reftests/transforms/rotated-image.yaml | 72 +++++++++++++++++++++ .../transforms/screen-space-blit-trivial.png | Bin 0 -> 74583 bytes .../transforms/screen-space-blit-trivial.yaml | 22 +++++++ .../reftests/transforms/screen-space-blit.png | Bin 0 -> 73794 bytes .../reftests/transforms/screen-space-blit.yaml | 22 +++++++ .../reftests/transforms/screen-space-blur.png | Bin 0 -> 230748 bytes .../reftests/transforms/screen-space-blur.yaml | 20 ++++++ .../reftests/transforms/segments-bug-ref.yaml | 22 +++++++ .../wrench/reftests/transforms/segments-bug.yaml | 26 ++++++++ .../wrench/reftests/transforms/singular-ref.yaml | 28 ++++++++ gfx/wr/wrench/reftests/transforms/singular.yaml | 39 +++++++++++ .../transforms/snapped-preserve-3d-ref.yaml | 19 ++++++ .../reftests/transforms/snapped-preserve-3d.yaml | 21 ++++++ .../wrench/reftests/transforms/strange-w-ref.yaml | 12 ++++ gfx/wr/wrench/reftests/transforms/strange-w.yaml | 15 +++++ 99 files changed, 1496 insertions(+) create mode 100644 gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/blank.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale-2.png create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale-2.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale-3.png create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale-3.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale-4.png create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale-4.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale.png create mode 100644 gfx/wr/wrench/reftests/transforms/border-scale.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/border-zoom.png create mode 100644 gfx/wr/wrench/reftests/transforms/border-zoom.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/clip-translate.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.png create mode 100644 gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/content-offset.png create mode 100644 gfx/wr/wrench/reftests/transforms/content-offset.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/coord-system.png create mode 100644 gfx/wr/wrench/reftests/transforms/coord-system.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/firefox.png create mode 100644 gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/flatten-twice.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/image-rotated-clip.png create mode 100644 gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/image.png create mode 100644 gfx/wr/wrench/reftests/transforms/large-raster-root.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/local-clip.png create mode 100644 gfx/wr/wrench/reftests/transforms/local-clip.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/near-plane-clip.png create mode 100644 gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/nested-preserve-3d.png create mode 100644 gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.png create mode 100644 gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/nested-rotate-x.png create mode 100644 gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-border-radius.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-clip-1.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-clip.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-clip.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-mask.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-mask.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-origin.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-origin.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-shadow.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-surface-scale.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/perspective.png create mode 100644 gfx/wr/wrench/reftests/transforms/perspective.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/prim-suite.png create mode 100644 gfx/wr/wrench/reftests/transforms/prim-suite.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/reftest.list create mode 100644 gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/rotate-clip.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/rotated-clip-large.png create mode 100644 gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/rotated-clip.png create mode 100644 gfx/wr/wrench/reftests/transforms/rotated-clip.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/rotated-image.png create mode 100644 gfx/wr/wrench/reftests/transforms/rotated-image.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.png create mode 100644 gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/screen-space-blit.png create mode 100644 gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/screen-space-blur.png create mode 100644 gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/segments-bug.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/singular-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/singular.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml create mode 100644 gfx/wr/wrench/reftests/transforms/strange-w.yaml (limited to 'gfx/wr/wrench/reftests/transforms') diff --git a/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml new file mode 100644 index 0000000000..357981c103 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - type: rect + bounds: [ 0, 0, 200, 44 ] + color: green diff --git a/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml new file mode 100644 index 0000000000..10db1ae2b2 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/big-axis-aligned-scale.yaml @@ -0,0 +1,10 @@ +--- +root: + items: + - type: stacking-context + transform-style: preserve-3d + transform: scale(-2, 44, 1) + items: + - type: rect + bounds: [ -100, -100, 200, 101 ] + color: green diff --git a/gfx/wr/wrench/reftests/transforms/blank.yaml b/gfx/wr/wrench/reftests/transforms/blank.yaml new file mode 100644 index 0000000000..c4eb3ab673 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/blank.yaml @@ -0,0 +1,2 @@ +--- +root: diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-2.png b/gfx/wr/wrench/reftests/transforms/border-scale-2.png new file mode 100644 index 0000000000..b848abfbff Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/border-scale-2.png differ diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-2.yaml b/gfx/wr/wrench/reftests/transforms/border-scale-2.yaml new file mode 100644 index 0000000000..f841033766 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/border-scale-2.yaml @@ -0,0 +1,19 @@ +--- +root: + items: + - type: stacking-context + bounds: [50, 50, 100, 100] + transform: scale(0.5) + items: + - type: border + bounds: [ 100, 100, 400, 200 ] + width: [ 20, 20, 20, 20 ] + border-type: normal + style: solid + color: [ blue, blue, blue, blue ] + radius: { + top-left: [100, 100], + top-right: [100, 100], + bottom-left: [100, 100], + bottom-right: [100, 100], + } diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-3.png b/gfx/wr/wrench/reftests/transforms/border-scale-3.png new file mode 100644 index 0000000000..f51553e04f Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/border-scale-3.png differ diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-3.yaml b/gfx/wr/wrench/reftests/transforms/border-scale-3.yaml new file mode 100644 index 0000000000..9308f2471d --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/border-scale-3.yaml @@ -0,0 +1,19 @@ +--- +root: + items: + - type: stacking-context + bounds: [50, 50, 100, 100] + transform: [10,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1] + items: + - type: border + bounds: [ 5, 50, 20, 100 ] + width: [ 10, 1, 10, 1 ] + border-type: normal + style: solid + color: blue + radius: { + top-left: [5, 50], + top-right: [5, 50], + bottom-left: [5, 50], + bottom-right: [5, 50], + } diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-4.png b/gfx/wr/wrench/reftests/transforms/border-scale-4.png new file mode 100644 index 0000000000..6e1d664f9a Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/border-scale-4.png differ diff --git a/gfx/wr/wrench/reftests/transforms/border-scale-4.yaml b/gfx/wr/wrench/reftests/transforms/border-scale-4.yaml new file mode 100644 index 0000000000..b2e50bbd2c --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/border-scale-4.yaml @@ -0,0 +1,19 @@ +--- +root: + items: + - type: stacking-context + bounds: [50, 50, 100, 100] + transform: [1,0,0,0, 0,10,0,0, 0,0,1,0, 0,0,0,1] + items: + - type: border + bounds: [ 50, 5, 200, 10 ] + width: [ 1, 10, 1, 10 ] + border-type: normal + style: solid + color: [ blue, blue, blue, blue ] + radius: { + top-left: [50, 5], + top-right: [50, 5], + bottom-left: [50, 5], + bottom-right: [50, 5], + } diff --git a/gfx/wr/wrench/reftests/transforms/border-scale.png b/gfx/wr/wrench/reftests/transforms/border-scale.png new file mode 100644 index 0000000000..6577268663 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/border-scale.png differ diff --git a/gfx/wr/wrench/reftests/transforms/border-scale.yaml b/gfx/wr/wrench/reftests/transforms/border-scale.yaml new file mode 100644 index 0000000000..4bf10c3029 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/border-scale.yaml @@ -0,0 +1,19 @@ +--- +root: + items: + - type: stacking-context + bounds: [50, 50, 100, 100] + transform: scale(10) + items: + - type: border + bounds: [ 5, 5, 20, 10 ] + width: [ 1, 1, 1, 1 ] + border-type: normal + style: solid + color: [ blue, blue, blue, blue ] + radius: { + top-left: [5, 5], + top-right: [5, 5], + bottom-left: [5, 5], + bottom-right: [5, 5], + } diff --git a/gfx/wr/wrench/reftests/transforms/border-zoom.png b/gfx/wr/wrench/reftests/transforms/border-zoom.png new file mode 100644 index 0000000000..0bd7cc21ab Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/border-zoom.png differ diff --git a/gfx/wr/wrench/reftests/transforms/border-zoom.yaml b/gfx/wr/wrench/reftests/transforms/border-zoom.yaml new file mode 100644 index 0000000000..d36d66962b --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/border-zoom.yaml @@ -0,0 +1,22 @@ +--- +root: + items: + - type: reference-frame + transform: scale(4) + items: + - type: stacking-context + bounds: [50, 50, 100, 100] + transform: rotate(-30) + items: + - type: border + bounds: [ 10, 10, 100, 100 ] + width: [ 10, 10, 10, 10 ] + border-type: normal + style: solid + color: [ red, green, blue, black ] + radius: { + top-left: [20, 20], + top-right: [10, 10], + bottom-left: [25, 25], + bottom-right: [0, 0], + } diff --git a/gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml b/gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml new file mode 100644 index 0000000000..412397d90f --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/clip-translate-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - type: rect + color: red + bounds: [6, 168, 18, 18] diff --git a/gfx/wr/wrench/reftests/transforms/clip-translate.yaml b/gfx/wr/wrench/reftests/transforms/clip-translate.yaml new file mode 100644 index 0000000000..5d4d9a049f --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/clip-translate.yaml @@ -0,0 +1,23 @@ +--- +root: + items: + - + type: "stacking-context" + transform: [0.75, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] + items: + - + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 8, 224, 0, 1] + items: + - type: clip + id: 2 + image-mask: + image: solid-color(255, 0, 0, 255, 24, 24) + rect: [0, 0, 24, 24] + repeat: false + - type: stacking-context + clip-chain: [2] + items: + - type: rect + color: red + bounds: [0, 0, 24, 24] diff --git a/gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml b/gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml new file mode 100644 index 0000000000..9aa0884f62 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/complex-preserve-3d.yaml @@ -0,0 +1,24 @@ +# the root sc should dominate backface-visibility and hide the rect + +--- +root: + items: + - + bounds: [300, 300, 300, 300] + clip-rect: [300, 300, 300, 300] + type: "stacking-context" + transform: rotate-y(180) + transform-style: flat + backface-visible: false + items: + - + type: "stacking-context" + transform-style: preserve-3d + backface-visible: true + items: + - + bounds: [350, 350, 150, 150] + clip-rect: [350, 350, 150, 150] + type: rect + color: 255 255 0 0.4000 + backface-visible: true diff --git a/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.png b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.png new file mode 100644 index 0000000000..5e1b852f49 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.png differ diff --git a/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml new file mode 100644 index 0000000000..7cbea35433 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/computed-rotation-yflip.yaml @@ -0,0 +1,17 @@ +--- +root: + items: + - type: iframe + id: [1, 3] + bounds: [100, 100, 128, 256] +pipelines: + - + id: [1, 3] + items: + - type: computed-frame + scale-from: [256, 256] + vertical-flip: true + rotation: 90 + items: + - image: firefox.png + bounds: [0, 0, 256, 256] diff --git a/gfx/wr/wrench/reftests/transforms/content-offset.png b/gfx/wr/wrench/reftests/transforms/content-offset.png new file mode 100644 index 0000000000..16a39791b2 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/content-offset.png differ diff --git a/gfx/wr/wrench/reftests/transforms/content-offset.yaml b/gfx/wr/wrench/reftests/transforms/content-offset.yaml new file mode 100644 index 0000000000..379b269fe6 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/content-offset.yaml @@ -0,0 +1,18 @@ +--- +root: + items: + - + type: "stacking-context" + perspective: 1000 + perspective-origin: 0 0 + "transform-style": "preserve-3d" + items: + - + type: "stacking-context" + transform: rotate-x(-45) translate(100, 100, 0) + "transform-style": "preserve-3d" + items: + - + bounds: [0, 0, 200, 200] + type: rect + color: red diff --git a/gfx/wr/wrench/reftests/transforms/coord-system.png b/gfx/wr/wrench/reftests/transforms/coord-system.png new file mode 100644 index 0000000000..49890ebccf Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/coord-system.png differ diff --git a/gfx/wr/wrench/reftests/transforms/coord-system.yaml b/gfx/wr/wrench/reftests/transforms/coord-system.yaml new file mode 100644 index 0000000000..236ebb6d8f --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/coord-system.yaml @@ -0,0 +1,24 @@ +--- +root: + items: + - + type: "stacking-context" + perspective: [1, 0, 0, 0, 0, 1, 0, 0, -0.102400005, -0.185, 1, -0.0005, 0, 0, 0, 1] + items: + - + type: "scroll-frame" + id: 2 + "content-size": [1024, 740] + bounds: [0, 0, 1024, 740] + - + bounds: [0, 0, 1024, 200] + "clip-rect": [0, 0, 1024, 200] + spatial-id: 2 + type: "stacking-context" + transform: [0.70710677, 0, -0.70710677, 0, 0, 1, 0, 0, 0.70710677, 0, 0.70710677, 0, 149.96133, 0, -937.9613, 1] + items: + - + bounds: [0, 0, 1024, 200] + "clip-rect": [0, 0, 1024, 200] + type: rect + color: 0 128 0 1.0000 diff --git a/gfx/wr/wrench/reftests/transforms/firefox.png b/gfx/wr/wrench/reftests/transforms/firefox.png new file mode 100644 index 0000000000..696ba9c9b5 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/firefox.png differ diff --git a/gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml b/gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml new file mode 100644 index 0000000000..fd60bccb4b --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/flatten-all-flat-ref.yaml @@ -0,0 +1,18 @@ +--- +root: + items: + - type: reference-frame + transform-style: flat + items: + - type: reference-frame + perspective: 1000 + transform-style: flat + items: + - type: reference-frame + transform: rotate-z(-45) rotate-x(-75) + bounds: 50 0 100 100 + transform-style: flat + items: + - type: rect + bounds: 0 0 100 100 + color: green diff --git a/gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml b/gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml new file mode 100644 index 0000000000..d471b052cc --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/flatten-all-flat.yaml @@ -0,0 +1,20 @@ +# This test has a series of flat transforms that affect Z. +--- +root: + items: + - type: reference-frame + transform: rotate-y(0.0001) # this transform used to affect the Z coordinates during flattening + transform-style: flat + items: + - type: reference-frame + perspective: 1000 + transform-style: flat + items: + - type: reference-frame + transform: rotate-z(-45) rotate-x(-75) + bounds: 50 0 100 100 + transform-style: flat + items: + - type: rect + bounds: 0 0 100 100 + color: green diff --git a/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml new file mode 100644 index 0000000000..5dbf829e02 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - bounds: [100, 150, 150, 75] + type: rect + color: green diff --git a/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml new file mode 100644 index 0000000000..b3507a985a --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/flatten-preserve-3d-root.yaml @@ -0,0 +1,23 @@ +# This test ensures that we flatten the trasformations (i.e. zero out Z coordinates) +# at the boundaries of preserve-3d hierarchies. +# If the stacking context isn't flattened at the preserve-3d boundary here, +# it's non-zero Z component starts affecting the screen space position +# due to the "rotate-x" transform at the top level. +--- +root: + items: + - + bounds: [100, 100, 0, 0] + type: stacking-context + transform: rotate-x(60) + transform-style: flat + items: + - + type: "stacking-context" + transform: translate(0, 0, 200) + transform-style: preserve-3d + items: + - + bounds: [0, 0, 150, 150] + type: rect + color: green diff --git a/gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml b/gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml new file mode 100644 index 0000000000..27e4183555 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/flatten-twice-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - type: rect + bounds: [100, 100, 200, 100] + color: green diff --git a/gfx/wr/wrench/reftests/transforms/flatten-twice.yaml b/gfx/wr/wrench/reftests/transforms/flatten-twice.yaml new file mode 100644 index 0000000000..9af750a7c0 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/flatten-twice.yaml @@ -0,0 +1,21 @@ +# This test ensures that we flatten the "flat" style trasformations. +# If the flattening doesn't happen here, the rect gets rotated back +# to the original position. +--- +root: + items: + - + bounds: [100, 100, 0, 0] + type: stacking-context + transform: rotate-x(45) + transform-origin: 0 0 + items: + - + type: "stacking-context" + transform: rotate-x(-45) + transform-origin: 0 0 + items: + - + bounds: [0, 0, 200, 200] + type: rect + color: green diff --git a/gfx/wr/wrench/reftests/transforms/image-rotated-clip.png b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.png new file mode 100644 index 0000000000..96439dbc6e Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.png differ diff --git a/gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml new file mode 100644 index 0000000000..71f7300a5f --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/image-rotated-clip.yaml @@ -0,0 +1,19 @@ +--- +root: + items: + - + bounds: [18, 18, 400, 400] + "clip-rect": [18, 18, 400, 400] + type: clip + id: 2 + "content-size": [400, 400] + - + bounds: [0, 0, 0, 0] + clip-chain: [2] + type: "stacking-context" + transform: [0.70710677, 0.70710677, 0, 0, -0.70710677, 0.70710677, 0, 0, 0, 0, 1, 0, 218, -64.84271, 0, 1] + items: + - + bounds: [0, 0, 400, 400] + "clip-rect": [0, 0, 400, 400] + image: solid-color(255, 0, 0, 255, 400, 400) diff --git a/gfx/wr/wrench/reftests/transforms/image.png b/gfx/wr/wrench/reftests/transforms/image.png new file mode 100644 index 0000000000..c8ec5aefcc Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/image.png differ diff --git a/gfx/wr/wrench/reftests/transforms/large-raster-root.yaml b/gfx/wr/wrench/reftests/transforms/large-raster-root.yaml new file mode 100644 index 0000000000..0c5176d06d --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/large-raster-root.yaml @@ -0,0 +1,14 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 600, 600] + perspective: 20 + items: + - type: stacking-context + transform: rotate-z(-45) rotate-x(-45) + filters: drop-shadow([0, 0], 10000, blue) + items: + - type: rect + bounds: [0, 0, 20000, 100] + color: green diff --git a/gfx/wr/wrench/reftests/transforms/local-clip.png b/gfx/wr/wrench/reftests/transforms/local-clip.png new file mode 100644 index 0000000000..1f5004902c Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/local-clip.png differ diff --git a/gfx/wr/wrench/reftests/transforms/local-clip.yaml b/gfx/wr/wrench/reftests/transforms/local-clip.yaml new file mode 100644 index 0000000000..035a97cc17 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/local-clip.yaml @@ -0,0 +1,26 @@ +--- +root: + items: + - + bounds: [0, 0, 1000, 1000] + "clip-rect": [0, 0, 1000, 1000] + type: clip + id: 3 + "content-size": [1000, 1000] + - + bounds: [0, 0, 0, 0] + clip-chain: [3] + type: "stacking-context" + transform: rotate(-45) translate(200, 200) + items: + - + bounds: [0, 0, 100, 100] + "clip-rect": [0, 0, 100, 100] + type: clip + id: 4 + "content-size": [100, 100] + - + bounds: [2, -182, 152, 216] + "clip-rect": [2, 0, 152, 34] + clip-chain: [3, 4] + image: solid-color(255, 0, 0, 255, 100, 100) diff --git a/gfx/wr/wrench/reftests/transforms/near-plane-clip.png b/gfx/wr/wrench/reftests/transforms/near-plane-clip.png new file mode 100644 index 0000000000..05dabb1fe2 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/near-plane-clip.png differ diff --git a/gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml b/gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml new file mode 100644 index 0000000000..3bbafca974 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/near-plane-clip.yaml @@ -0,0 +1,18 @@ +# Test the calculation for screen bounds for transformed primitives that cross the near plane. +--- +root: + items: + - + bounds: [0, 0, 1000, 1000] + type: "stacking-context" + perspective: 200 + items: + - + bounds: [0, 0, 1000, 1000] + type: "stacking-context" + transform: rotate-x(30) + items: + - + bounds: [350, 200, 260, 300] + image: checkerboard(2, 16, 16) + stretch-size: 260 260 diff --git a/gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml b/gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml new file mode 100644 index 0000000000..79007ad26a --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/nested-local-scale-ref.yaml @@ -0,0 +1,23 @@ +--- +root: + items: + - type: "stacking-context" + transform: rotate(45) + transform-origin: 450 150 + raster-space: local(5.0) + items: + - type: "stacking-context" + transform: scale(5) + transform-origin: 50 50 + filters: [identity] + raster-space: local(5.0) + items: + - type: clip + id: 2 + complex: + - rect: [0, 0, 100, 100] + radius: 10 + - type: rect + clip-chain: [2] + bounds: 0 0 100 100 + color: red diff --git a/gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml b/gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml new file mode 100644 index 0000000000..6733cdb416 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/nested-local-scale.yaml @@ -0,0 +1,24 @@ +# Ensure that local raster scale from a parent is propagated to child surfaces +--- +root: + items: + - type: "stacking-context" + transform: rotate(45) + transform-origin: 450 150 + raster-space: local(5.0) + items: + - type: "stacking-context" + transform: scale(5) + transform-origin: 50 50 + filters: [identity] + raster-space: local(1.0) + items: + - type: clip + id: 2 + complex: + - rect: [0, 0, 100, 100] + radius: 10 + - type: rect + clip-chain: [2] + bounds: 0 0 100 100 + color: red diff --git a/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.png b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.png new file mode 100644 index 0000000000..686a22cf0a Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.png differ diff --git a/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml new file mode 100644 index 0000000000..e7f0f05407 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/nested-preserve-3d.yaml @@ -0,0 +1,28 @@ +--- +root: + items: + - + bounds: [260, 260, 231, 231] + "clip-rect": [260, 260, 231, 231] + type: border + width: 3 + "border-type": normal + color: 0 0 255 1.0000 + style: dashed + - + bounds: [300, 300, 0, 0] + "clip-rect": [300, 300, 0, 0] + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1] + transform-style: preserve-3d + items: + - + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1] + transform-style: preserve-3d + items: + - + bounds: [0, 0, 150, 150] + "clip-rect": [0, 0, 150, 150] + type: rect + color: 255 255 0 0.4000 diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.png b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.png new file mode 100644 index 0000000000..ca33ca1336 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.png differ diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml new file mode 100644 index 0000000000..ed25c8f09d --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/nested-rotate-x-flat.yaml @@ -0,0 +1,27 @@ +# This is the same as nested-rotate-x.yaml but without the preserve-3d. +--- +root: + items: + - + bounds: [260, 260, 231, 231] + "clip-rect": [260, 260, 231, 231] + type: border + width: 3 + "border-type": normal + color: 0 0 255 1.0000 + style: dashed + - + bounds: [300, 300, 0, 0] + "clip-rect": [300, 300, 0, 0] + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1] + items: + - + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1] + items: + - + bounds: [0, 0, 150, 150] + "clip-rect": [0, 0, 150, 150] + type: rect + color: 255 255 0 0.4000 diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x.png b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.png new file mode 100644 index 0000000000..73ad1cec41 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.png differ diff --git a/gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml new file mode 100644 index 0000000000..f1f8bd36c9 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/nested-rotate-x.yaml @@ -0,0 +1,27 @@ +--- +root: + items: + - + bounds: [260, 260, 231, 231] + "clip-rect": [260, 260, 231, 231] + type: border + width: 3 + "border-type": normal + color: 0 0 255 1.0000 + style: dashed + - + bounds: [300, 300, 0, 0] + "clip-rect": [300, 300, 0, 0] + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 75, -75, 1] + transform-style: preserve-3d + items: + - + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 0.8660254, -0.5, 0, 0, 0.5, 0.8660254, 0, 0, 10.048096, 37.5, 1] + items: + - + bounds: [0, 0, 150, 150] + "clip-rect": [0, 0, 150, 150] + type: rect + color: 255 255 0 0.4000 diff --git a/gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml b/gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml new file mode 100644 index 0000000000..f94404f58e --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/non-inversible-world-rect.yaml @@ -0,0 +1,23 @@ +# Tests that `get_raster_rects` raster -> world transform is inversible in general, +# but one of the vertices of the world rectangles can't map back to the raster. +--- +root: + items: + - type: stacking-context + bounds: 0 0 400 400 + perspective: 800 + perspective-origin: 50% 200 + items: + - type: stacking-context + bounds: 0 0 400 400 + transform-style: preserve-3d + transform: rotate-z(40) translate(400, 200, 0) + margin: 100 + items: + - type: stacking-context + bounds: 0 0 1000 1000 + transform: rotate-y(-75) translate(0, 0, -500) + items: + - type: rect + bounds: [0, 0, 200, 200] + color: red diff --git a/gfx/wr/wrench/reftests/transforms/perspective-border-radius.png b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.png new file mode 100644 index 0000000000..bf74b0a502 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml new file mode 100644 index 0000000000..5eb1f4230c --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-border-radius.yaml @@ -0,0 +1,26 @@ +--- +root: + items: + - + bounds: [0, 0, 1000, 1000] + type: "stacking-context" + perspective: 256 + items: + - + bounds: [128, 128, 256, 256] + type: "stacking-context" + transform: rotate-x(-60) rotate-y(-120) + items: + - type: clip + id: 101 + complex: + - rect: [128, 128, 256, 256] + radius: [64, 32] + - type: clip-chain + id: 201 + clips: [101] + - + bounds: [128, 128, 256, 256] + type: rect + color: blue + clip-chain: 201 diff --git a/gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml new file mode 100644 index 0000000000..36df831e19 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow-ref.yaml @@ -0,0 +1,24 @@ +--- +root: + items: + - + type: "stacking-context" + transform-style: "preserve-3d" + items: + - + type: "reference-frame" + transform: [1, 0, 0, 0, -0.20399817824363708, 0.05275486409664154, 0.9659258127212524, -0.0008049382013268769, -0.05466114357113838, -1.0211405754089355, 0.258819043636322, -0.00021568253578152508, 52.22355651855469, 242.49476623535156, -247.27700805664063, 1.206064224243164] + items: + - + type: "stacking-context" + items: + - + type: "box-shadow" + bounds: [30, 0, 507, 512] + box-bounds: [30, 0, 507, 512] + offset: [-14, 4] + blur-radius: 8 + spread-radius: -4 + border-radius: 256 + clip-mode: "inset" + color: red diff --git a/gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml new file mode 100644 index 0000000000..99e247bf49 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-box-shadow.yaml @@ -0,0 +1,23 @@ +--- +root: + items: + - + type: "stacking-context" + items: + - + type: "reference-frame" + transform: [1, 0, 0, 0, -0.20399817824363708, 0.05275486409664154, 0.9659258127212524, -0.0008049382013268769, -0.05466114357113838, -1.0211405754089355, 0.258819043636322, -0.00021568253578152508, 52.22355651855469, 242.49476623535156, -247.27700805664063, 1.206064224243164] + items: + - + type: "stacking-context" + items: + - + type: "box-shadow" + bounds: [30, 0, 507, 512] + box-bounds: [30, 0, 507, 512] + offset: [-14, 4] + blur-radius: 8 + spread-radius: -4 + border-radius: 256 + clip-mode: "inset" + color: red diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png new file mode 100644 index 0000000000..2cc992c168 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml new file mode 100644 index 0000000000..82668e28cc --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-clip-1.yaml @@ -0,0 +1,30 @@ +--- +root: + items: + - + type: stacking-context + bounds: [0, 0, 0, 0] + perspective: [1, 0, 0, 0, 0, 1, 0, 0, -300, -250, 1, -0.5, 0, 0, 0, 1] + items: + - + bounds: [0, 0, 0, 0] + type: stacking-context + transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1] + items: + - + bounds: [0, 0, 100, 100] + type: rect + color: red + - type: clip + id: 101 + complex: + - rect: [0, 0, 100, 100] + radius: 16 + - type: clip-chain + id: 201 + clips: [101] + - + bounds: [0, 0, 100, 100] + type: rect + color: green + clip-chain: 201 diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip.png b/gfx/wr/wrench/reftests/transforms/perspective-clip.png new file mode 100644 index 0000000000..ef97fb311e Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective-clip.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-clip.yaml b/gfx/wr/wrench/reftests/transforms/perspective-clip.yaml new file mode 100644 index 0000000000..bbb9c35efb --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-clip.yaml @@ -0,0 +1,27 @@ +# Test that a local space clip is correctly applied to +# a primitive with a perspective transform. +--- +root: + items: + - type: clip + id: 2 + complex: + - rect: [225, 200, 150, 200] + radius: 32 + - + type: "stacking-context" + bounds: 0 0 1000 1000 + perspective: 100 + perspective-origin: 300 300 + items: + - + type: "stacking-context" + transform: rotate-x(-10) + transform-origin: 300 300 + filters: identity + items: + - + bounds: [200, 200, 200, 200] + image: checkerboard(2, 16, 12) + stretch-size: 200 200 + clip-chain: [2] diff --git a/gfx/wr/wrench/reftests/transforms/perspective-mask.png b/gfx/wr/wrench/reftests/transforms/perspective-mask.png new file mode 100644 index 0000000000..fdcb7230e3 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective-mask.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-mask.yaml b/gfx/wr/wrench/reftests/transforms/perspective-mask.yaml new file mode 100644 index 0000000000..9f95549554 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-mask.yaml @@ -0,0 +1,24 @@ +--- +root: + items: + - + type: "scroll-frame" + id: 2 + "content-size": [500, 100] + bounds: [0, 0, 500, 100] + clip-to-frame: true + items: + - + type: "stacking-context" + perspective: 125 + items: + - + type: "stacking-context" + bounds: [0, 0, 250, 100] + transform: rotate-y(54) + items: + - + bounds: [0, 0, 128, 128] + type: rect + color: red + clip-chain: [2] diff --git a/gfx/wr/wrench/reftests/transforms/perspective-origin.png b/gfx/wr/wrench/reftests/transforms/perspective-origin.png new file mode 100644 index 0000000000..581d524767 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective-origin.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-origin.yaml b/gfx/wr/wrench/reftests/transforms/perspective-origin.yaml new file mode 100644 index 0000000000..ca5eb5f95c --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-origin.yaml @@ -0,0 +1,16 @@ +--- +root: + items: + - + bounds: [0, 0, 1000, 1000] + type: "stacking-context" + perspective: 200 + items: + - + bounds: [0, 0, 1000, 1000] + type: "stacking-context" + transform: rotate-x(-45) + items: + - + bounds: [350, 400, 260, 260] + image: checkerboard(2, 16, 16) diff --git a/gfx/wr/wrench/reftests/transforms/perspective-shadow.png b/gfx/wr/wrench/reftests/transforms/perspective-shadow.png new file mode 100644 index 0000000000..07befbd35b Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective-shadow.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml b/gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml new file mode 100644 index 0000000000..8b8e7c87d2 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-shadow.yaml @@ -0,0 +1,27 @@ +--- +root: + items: + - + type: stacking-context + bounds: [0, 0, 0, 0] + transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 139, 0, 1] + items: + - + type: stacking-context + bounds: [0, 0, 0, 0] + perspective: [1, 0, 0, 0, 0, 1, 0, 0, -299, -250, 1, -0.5, 0, 0, 0, 1] + items: + - + bounds: [0, 0, 0, 0] + type: stacking-context + transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1] + items: + - + type: box-shadow + bounds: [548, 200, 100, 100] + color: 0 0 0 0.7020 + blur-radius: 20 + - + bounds: [548, 200, 100, 100] + type: rect + color: 0 255 0 1.0000 diff --git a/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.png b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.png new file mode 100644 index 0000000000..f80f5938d5 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml new file mode 100644 index 0000000000..6888f91c7e --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective-surface-scale.yaml @@ -0,0 +1,14 @@ +# Verify that we select a reasonable scale factor for perspective surfaces that don't +# have a requested scale factor supplied by the caller (based on projected screen rect) +root: + items: + - type: "stacking-context" + perspective: 1000 + transform-style: preserve-3d + items: + - type: "stacking-context" + transform-origin: 175 175 + transform: rotate-x(-20) rotate-y(20) + items: + - image: checkerboard(2, 22, 16) + bounds: [0, 0, 350, 350] diff --git a/gfx/wr/wrench/reftests/transforms/perspective.png b/gfx/wr/wrench/reftests/transforms/perspective.png new file mode 100644 index 0000000000..05000384c2 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/perspective.png differ diff --git a/gfx/wr/wrench/reftests/transforms/perspective.yaml b/gfx/wr/wrench/reftests/transforms/perspective.yaml new file mode 100644 index 0000000000..2ebd0899c6 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/perspective.yaml @@ -0,0 +1,54 @@ +--- +root: + items: + - + type: "stacking-context" + items: + - + type: "stacking-context" + transform: [1, 0, 0, 0, -1.0606601, -0.35355338, 0.70710677, -0.0035355338, -1.0606601, -1.767767, 0.70710677, -0.0035355338, 306.06604, 335.35535, -70.71068, 1.3535534] + items: + - + bounds: [0, 0, 200, 200] + image: checkerboard(2, 16, 12) + stretch-size: 200 200 + - + type: "stacking-context" + transform: [3.1819804, 1.0606601, -0.70710677, 0.0035355338, 0, 1, 0, 0, -1.7677668, -1.0606601, 0.70710677, -0.0035355338, 381.80194, 93.93398, 70.71068, 0.6464466] + items: + - + bounds: [0, 0, 200, 200] + image: checkerboard(2, 16, 12) + stretch-size: 200 200 + - + type: "stacking-context" + transform: [3.182372, 1.088346, -0.4353384, 0.002176692, -1.0183089, 0.7350135, 0.10599462, -0.00052997307, -4.481691, -1.2350134, 0.89400536, -0.0044700266, 883.5937, 117.66405, 32.93438, 0.8353281] + items: + - + bounds: [0, 0, 200, 200] + image: checkerboard(2, 16, 12) + stretch-size: 200 200 + - + type: "stacking-context" + transform: [0.29134378, -0.9896399, 0.6324555, -0.0015811388, 0.3543281, 1.4948199, -0.31622776, 0.0007905694, -1.1627856, -0.92120904, 0.70710677, -0.0017677669, 235.43283, 649.48206, -31.622776, 1.079057] + items: + - + bounds: [0, 0, 200, 200] + image: checkerboard(2, 16, 12) + stretch-size: 200 200 + - + type: "stacking-context" + transform: [1, 0, 0, 0, 1, 1, 0, 0, -3.5, -3.5, 1, -0.005, 500, 600, 0, 1] + items: + - + bounds: [0, 0, 200, 200] + image: checkerboard(2, 16, 12) + stretch-size: 200 200 + - + type: "stacking-context" + transform: [0.82903755, 0.78133285, 0, 0, -0.5591929, 0.67920226, 0, 0, -5.5, -3.5, 1, -0.005, 1073.0155, 553.9465, 0, 1] + items: + - + bounds: [0, 0, 200, 200] + image: checkerboard(2, 16, 12) + stretch-size: 200 200 diff --git a/gfx/wr/wrench/reftests/transforms/prim-suite.png b/gfx/wr/wrench/reftests/transforms/prim-suite.png new file mode 100644 index 0000000000..0ae3ebe2ed Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/prim-suite.png differ diff --git a/gfx/wr/wrench/reftests/transforms/prim-suite.yaml b/gfx/wr/wrench/reftests/transforms/prim-suite.yaml new file mode 100644 index 0000000000..241a2e1c0a --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/prim-suite.yaml @@ -0,0 +1,45 @@ +--- +root: + items: + - type: stacking-context + bounds: [50, 50, 100, 100] + transform: rotate(-30) + items: + - type: rect + bounds: [ 10, 10, 80, 80 ] + color: [0, 255, 0] + - type: box-shadow + bounds: [ 10, 10, 80, 80 ] + blur-radius: 25 + clip-mode: inset + + - type: rect + bounds: [ 140, 10, 80, 80 ] + color: [0, 255, 0] + - type: box-shadow + bounds: [ 140, 10, 80, 80 ] + blur-radius: 25 + clip-mode: outset + + - type: border + bounds: [ 250, 10, 100, 100 ] + width: [ 10, 10, 10, 10 ] + border-type: normal + style: solid + color: [ red, green, blue, black ] + radius: { + top-left: [20, 20], + top-right: [10, 10], + bottom-left: [25, 25], + bottom-right: [0, 0], + } + + - bounds: [150, 150, 128, 128] + image: checkerboard(4, 15, 8) + stretch-size: 128 128 + + - type: radial-gradient + bounds: 300 150 100 100 + center: 50 50 + radius: 50 50 + stops: [0, red, 1, blue] diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml new file mode 100644 index 0000000000..acdcc61d56 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster-root-huge-scale.yaml @@ -0,0 +1,35 @@ +# Tests that raster roots with very large scaling factors do not cause device rects to overflow. +# See bug 1642440 +--- +root: + items: + - type: stacking-context + bounds: 0 0 0 0 + transform: scale(99999999) + transform-style: preserve-3d + filters: invert(1) + items: + - type: stacking-context + bounds: 0 0 0 0 + transform: scale(0.0000001) + transform-style: preserve-3d + items: + - type: clip + clip-rect: [0, 0, 60000, 60000] + id: 2 + complex: + - rect: [0, 0, 100, 100] + radius: [20, 20] + "clip-mode": clip + - type: stacking-context + bounds: 0 0 0 0 + items: + - rect: 0 0 100 100 + color: red + clip-chain: [2] + - type: box-shadow + bounds: 0 0 100 100 + color: blue + offset: 10 20 + blur-radius: 10 + border-radius: [ 20, 20, 20, 20 ] diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml new file mode 100644 index 0000000000..15cea6a697 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster-root-large-mask.yaml @@ -0,0 +1,28 @@ +# Make sure we don't panic by trying to create an excessively large mask render task +# See bug 1637796 +--- +root: + items: + - type: stacking-context + bounds: 0 0 0 0 + transform: perspective(300) + items: + - type: stacking-context + bounds: 0 0 0 0 + transform-style: preserve-3d + transform: ["scale(0.001667, 0.001667)"] + items: + - type: clip + clip-rect: [10, 10, 60000, 60000] + id: 2 + complex: + - rect: [10, 10, 60000, 60000] + radius: [10000, 10000] + "clip-mode": clip + - type: stacking-context + bounds: 0 0 0 0 + items: + - type: rect + bounds: 0 0 60000 60000 + color: blue + clip-chain: [2] diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml new file mode 100644 index 0000000000..925d81951e --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2-ref.yaml @@ -0,0 +1,11 @@ +# Tests that the correct device pixel scale is propagated to child surfaces. +# See bug 1639729 +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 0, 0] + filters: invert(1) + items: + - image: checkerboard(2, 16, 16) + bounds: [0, 0, 260, 260] diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml new file mode 100644 index 0000000000..4455b286e5 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-2.yaml @@ -0,0 +1,20 @@ +# Tests that the correct device pixel scale is propagated to child surfaces. +# See bug 1639729 +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 0, 0] + items: + - type: stacking-context + bounds: [0, 0, 0, 0] + transform-style: preserve-3d + transform: scale(10,10) + items: + - type: stacking-context + bounds: 0 0 0 0 + # Create a non-raster root surface + filters: invert(1) + items: + - image: checkerboard(2, 16, 16) + bounds: [0, 0, 26, 26] diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml new file mode 100644 index 0000000000..5088e01756 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling-ref.yaml @@ -0,0 +1,10 @@ + +# Tests that surfaces created by raster roots are scaled based on the surface to parent transform. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 0, 0] + items: + - image: checkerboard(2, 16, 16) + bounds: [0, 0, 260, 260] diff --git a/gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml b/gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml new file mode 100644 index 0000000000..e7d873888e --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster-root-scaling.yaml @@ -0,0 +1,14 @@ +# Tests that surfaces created by raster roots are scaled based on the surface to parent transform. +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 0, 0] + items: + - type: stacking-context + bounds: [0, 0, 0, 0] + transform-style: preserve-3d + transform: scale(10,10) + items: + - image: checkerboard(2, 16, 16) + bounds: [0, 0, 26, 26] diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml new file mode 100644 index 0000000000..99813bacb8 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster_root_A_8192.yaml @@ -0,0 +1,26 @@ +root: + items: + - type: "stacking-context" + transform: scale(0.125) + items: + - type: "stacking-context" + perspective: 100 + perspective-origin: 100 50 + items: + - image: checkerboard(0, 512, 16); + bounds: [1600, 1600, 8192, 8192] + - type: clip + id: 101 + complex: + - rect: [2048, 2048, 4096, 4096] + radius: [1024, 1024] + - type: clip-chain + id: 201 + clips: [101] + - type: "stacking-context" + bounds: [0, 0, 8192, 8192] + mix-blend-mode: difference + clip-chain: 201 + items: + - image: checkerboard(0, 4096, 2); + bounds: [0, 0, 8192, 8192] diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml new file mode 100644 index 0000000000..82073907b6 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster_root_A_ref.yaml @@ -0,0 +1,26 @@ +root: + items: + - type: "stacking-context" + transform: scale(0.5) + items: + - type: "stacking-context" + perspective: 100 + perspective-origin: 100 50 + items: + - image: checkerboard(0, 128, 16); + bounds: 400 400 2048 2048 + - type: clip + id: 101 + complex: + - rect: [512, 512, 1024, 1024] + radius: [256, 256] + - type: clip-chain + id: 201 + clips: [101] + - type: "stacking-context" + bounds: [0, 0, 2048, 2048] + mix-blend-mode: difference + clip-chain: 201 + items: + - image: checkerboard(0, 1024, 2); + bounds: [0, 0, 2048, 2048] diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml new file mode 100644 index 0000000000..9f8a58f5cc --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster_root_B_8192.yaml @@ -0,0 +1,14 @@ +root: + items: + - type: stacking-context + bounds: [0, 0, 600, 600] + perspective: 100 + items: + - type: stacking-context + transform: rotate-z(20) rotate-x(60) + filters: [invert(1)] + mix-blend-mode: difference + items: + - type: rect + bounds: [0, 0, 20000, 100] + color: [20, 120, 18, 1.0] diff --git a/gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml b/gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml new file mode 100644 index 0000000000..3fea3a19db --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/raster_root_B_ref.yaml @@ -0,0 +1,14 @@ +root: + items: + - type: stacking-context + bounds: [0, 0, 600, 600] + perspective: 100 + items: + - type: stacking-context + transform: rotate-z(20) rotate-x(60) + filters: [invert(1)] + mix-blend-mode: difference + items: + - type: rect + bounds: [0, 0, 4000, 100] + color: [20, 120, 18, 1.0] diff --git a/gfx/wr/wrench/reftests/transforms/reftest.list b/gfx/wr/wrench/reftests/transforms/reftest.list new file mode 100644 index 0000000000..04dd52479e --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/reftest.list @@ -0,0 +1,59 @@ +platform(linux,mac) == local-clip.yaml local-clip.png +platform(linux,mac) == rotated-clip.yaml rotated-clip.png +platform(linux,mac) == rotated-clip-large.yaml rotated-clip-large.png +platform(linux,mac) == image-rotated-clip.yaml image-rotated-clip.png +# Something leaks the state: the test passes if only run `reftest reftests/transform` +# but fails when all the tests are run +platform(linux,mac) fuzzy(1,6) == rotated-image.yaml rotated-image.png +== singular.yaml singular-ref.yaml +platform(linux) fuzzy(1,630) == perspective.yaml perspective.png +platform(linux,mac) fuzzy(3,8100) == prim-suite.yaml prim-suite.png +fuzzy(2,26) == segments-bug.yaml segments-bug-ref.yaml +platform(linux,mac) == content-offset.yaml content-offset.png +platform(linux,mac) == coord-system.yaml coord-system.png +platform(linux,mac) fuzzy(1,15) == border-zoom.yaml border-zoom.png +platform(linux) fuzzy(1,520) == perspective-origin.yaml perspective-origin.png +platform(linux,mac) color_targets(3) alpha_targets(0) fuzzy(1,180) == screen-space-blit.yaml screen-space-blit.png +platform(linux,mac) fuzzy(1,346) color_targets(2) alpha_targets(0) == screen-space-blit-trivial.yaml screen-space-blit-trivial.png +platform(linux) fuzzy(11,4592) == screen-space-blur.yaml screen-space-blur.png +platform(linux,mac) fuzzy(1,25) == nested-rotate-x.yaml nested-rotate-x.png +platform(linux,mac) != nested-rotate-x.yaml nested-rotate-x-flat.yaml +platform(linux,mac) fuzzy(1,25) == nested-rotate-x-flat.yaml nested-rotate-x-flat.png +platform(linux,mac) fuzzy(1,25) == nested-preserve-3d.yaml nested-preserve-3d.png +platform(linux,mac) fuzzy(1,283) == near-plane-clip.yaml near-plane-clip.png +platform(linux,mac) == perspective-mask.yaml perspective-mask.png +== rotate-clip.yaml rotate-clip-ref.yaml +== clip-translate.yaml clip-translate-ref.yaml +platform(linux,mac) fuzzy(1,1) == perspective-clip.yaml perspective-clip.png +platform(linux,mac) fuzzy(1,2) == perspective-clip-1.yaml perspective-clip-1.png +platform(linux,mac) fuzzy(1,2) == perspective-shadow.yaml perspective-shadow.png +# The ref YAML here produces significantly worse quality +fuzzy(200,4200) == perspective-box-shadow.yaml perspective-box-shadow-ref.yaml +== complex-preserve-3d.yaml blank.yaml +platform(linux,mac) fuzzy(38,348) == perspective-border-radius.yaml perspective-border-radius.png +fuzzy(1,38) == snapped-preserve-3d.yaml snapped-preserve-3d-ref.yaml +platform(linux,mac) fuzzy(1,122) == border-scale.yaml border-scale.png +platform(linux,mac) fuzzy(1,16) == border-scale-2.yaml border-scale-2.png +platform(linux,mac) fuzzy(1,69) == border-scale-3.yaml border-scale-3.png +platform(linux,mac) fuzzy(1,74) == border-scale-4.yaml border-scale-4.png +# Just make sure we aren't crashing here +!= large-raster-root.yaml blank.yaml +== flatten-preserve-3d-root.yaml flatten-preserve-3d-root-ref.yaml +== flatten-twice.yaml flatten-twice-ref.yaml +fuzzy(1,10) == flatten-all-flat.yaml flatten-all-flat-ref.yaml +== strange-w.yaml strange-w-ref.yaml +== big-axis-aligned-scale.yaml big-axis-aligned-scale-ref.yaml +# Compare ~8K raster root (>MAX_SURFACE_SIZE) with ~2K raster root. fuzzy due to lerping on edges. +skip_on(android) fuzzy-range(<=3,*3077,<=10,*133,<=93,*490) == raster_root_A_8192.yaml raster_root_A_ref.yaml +# Same as large-raster-root.yaml but resulting in a 10302×100 raster root (= >4096) vs 4000x100 in ref: +skip_on(android) fuzzy(60,917) == raster_root_B_8192.yaml raster_root_B_ref.yaml +# Make sure we don't panic +!= raster-root-large-mask.yaml blank.yaml +skip_on(android) == raster-root-scaling.yaml raster-root-scaling-ref.yaml +skip_on(android) == raster-root-scaling-2.yaml raster-root-scaling-2-ref.yaml +# Make sure we don't panic +!= raster-root-huge-scale.yaml blank.yaml +!= non-inversible-world-rect.yaml blank.yaml +== nested-local-scale.yaml nested-local-scale-ref.yaml +platform(linux,mac) == perspective-surface-scale.yaml perspective-surface-scale.png +fuzzy(1,8762) == computed-rotation-yflip.yaml computed-rotation-yflip.png diff --git a/gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml b/gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml new file mode 100644 index 0000000000..133279fca8 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/rotate-clip-ref.yaml @@ -0,0 +1,7 @@ +--- +root: + items: + - + bounds: [100, 146, 150, 107] + type: rect + color: 0 128 0 1.0000 diff --git a/gfx/wr/wrench/reftests/transforms/rotate-clip.yaml b/gfx/wr/wrench/reftests/transforms/rotate-clip.yaml new file mode 100644 index 0000000000..c1c01d0dc4 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/rotate-clip.yaml @@ -0,0 +1,19 @@ +--- +root: + items: + - + type: clip + id: 2 + bounds: [0, 0, 2000, 2000] + clip-rect: [0, 0, 2000, 2000] + - + bounds: [100, 0, 150, 150] + type: "stacking-context" + transform: rotate-x(45) + transform-origin: [0, 500] + items: + - + bounds: [0, 0, 150, 150] + type: rect + color: 0 128 0 1.0000 + clip-chain: [2] diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip-large.png b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.png new file mode 100644 index 0000000000..e3c8ce7ab4 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.png differ diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml new file mode 100644 index 0000000000..cfea755a1e --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/rotated-clip-large.yaml @@ -0,0 +1,17 @@ +--- +root: + items: + - + bounds: 100 100 300 300 + items: + - type: clip + id: 2 + complex: + - rect: [20, 20, 200, 200] + radius: 32 + - type: rect + bounds: 20 20 200 200 + color: blue + clip-chain: [2] + type: stacking-context + transform: rotate(-33) diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip.png b/gfx/wr/wrench/reftests/transforms/rotated-clip.png new file mode 100644 index 0000000000..fe6e2aedb0 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/rotated-clip.png differ diff --git a/gfx/wr/wrench/reftests/transforms/rotated-clip.yaml b/gfx/wr/wrench/reftests/transforms/rotated-clip.yaml new file mode 100644 index 0000000000..534685541b --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/rotated-clip.yaml @@ -0,0 +1,17 @@ +--- +root: + items: + - + bounds: 100 100 100 100 + items: + - type: clip + id: 2 + complex: + - rect: [20, 20, 100, 100] + radius: 32 + - type: rect + bounds: 20 20 100 100 + color: blue + clip-chain: [2] + type: stacking-context + transform: rotate(-30) diff --git a/gfx/wr/wrench/reftests/transforms/rotated-image.png b/gfx/wr/wrench/reftests/transforms/rotated-image.png new file mode 100644 index 0000000000..012ffe6045 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/rotated-image.png differ diff --git a/gfx/wr/wrench/reftests/transforms/rotated-image.yaml b/gfx/wr/wrench/reftests/transforms/rotated-image.yaml new file mode 100644 index 0000000000..382aac71e7 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/rotated-image.yaml @@ -0,0 +1,72 @@ +--- +root: + items: + - + bounds: [0, 0, 2880, 1482] + "clip-rect": [0, 0, 2880, 1482] + "backface-visible": true + type: rect + color: white + - + bounds: [0, 0, 2880, 1482] + "clip-rect": [0, 0, 2880, 1482] + "backface-visible": true + type: clip + id: 10 + "content-size": [2880, 1482] + - + "clip-rect": [0, 0, 2880, 1482] + "backface-visible": true + type: "scroll-frame" + id: 2 + "content-size": [2880, 1482] + bounds: [0, 0, 2880, 1482] + - + bounds: [0, 0, 2880, 1482] + "clip-rect": [0, 0, 2880, 1482] + "backface-visible": true + type: clip + id: 3 + "content-size": [2880, 1482] + - + bounds: [0, 0, 2880, 1482] + "clip-rect": [0, 0, 2880, 1482] + "backface-visible": true + type: rect + color: white + - + bounds: [0, 0, 0, 0] + "clip-rect": [0, 0, 0, 0] + clip-chain: [10, 3] + "backface-visible": true + type: "stacking-context" + "scroll-policy": scrollable + transform: rotate-z(-1) + "transform-style": flat + items: + - + bounds: [2, 2, 200, 200] + "clip-rect": [2, 2, 200, 200] + "backface-visible": true + type: clip + id: 4 + "content-size": [200, 200] + - + bounds: [2, -182, 152, 216] + "clip-rect": [2, 0, 152, 34] + clip-chain: [10, 3, 4] + "backface-visible": true + image: "image.png" + "stretch-size": [152, 216] + "tile-spacing": [0, 0] + - + bounds: [0, 0, 204, 204] + "clip-rect": [0, 0, 204, 204] + "backface-visible": true + type: border + width: 2 + "border-type": normal + color: 0 0 255 1.0000 + style: solid + id: [1, 1] +pipelines: [] diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.png b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.png new file mode 100644 index 0000000000..a3cd78ba6b Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.png differ diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml new file mode 100644 index 0000000000..76b2578faa --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/screen-space-blit-trivial.yaml @@ -0,0 +1,22 @@ +# This test is similar to "screen-space-blit" but without filters, +# so the implementation doesn't attempt to bake the contents +# into a separate render target. +--- +root: + items: + - type: "stacking-context" + perspective: 100 + perspective-origin: 100 100 + items: + - type: "stacking-context" + transform-origin: 235 235 + transform: rotate-x(-15) + items: + - image: checkerboard(2, 16, 16) + bounds: [100, 100, 260, 260] + - type: "stacking-context" + transform-origin: 635 235 + transform: rotate-z(-45) + items: + - image: checkerboard(2, 16, 16) + bounds: [500, 100, 260, 260] diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit.png b/gfx/wr/wrench/reftests/transforms/screen-space-blit.png new file mode 100644 index 0000000000..39b7afb8e8 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/screen-space-blit.png differ diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml b/gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml new file mode 100644 index 0000000000..0bae3a3736 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/screen-space-blit.yaml @@ -0,0 +1,22 @@ +# This test uses `identity` filter on a preserve3D context to test how +# filters mix up with the SC's baking for preserve3d. +--- +root: + items: + - type: "stacking-context" + perspective: 100 + perspective-origin: 100 100 + items: + - type: "stacking-context" + transform-origin: 235 235 + transform: rotate-x(-15) + filters: identity + items: + - image: checkerboard(2, 16, 16) + bounds: [100, 100, 260, 260] + - type: "stacking-context" + transform-origin: 635 235 + transform: rotate-z(-45) + items: + - image: checkerboard(2, 16, 16) + bounds: [500, 100, 260, 260] diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blur.png b/gfx/wr/wrench/reftests/transforms/screen-space-blur.png new file mode 100644 index 0000000000..86ce88f896 Binary files /dev/null and b/gfx/wr/wrench/reftests/transforms/screen-space-blur.png differ diff --git a/gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml b/gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml new file mode 100644 index 0000000000..6d93260c83 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/screen-space-blur.yaml @@ -0,0 +1,20 @@ +root: + items: + - type: "stacking-context" + perspective: 100 + perspective-origin: 100 100 + items: + - type: "stacking-context" + transform-origin: 235 235 + transform: rotate-x(-15) + filters: blur(3, 3) + items: + - image: checkerboard(2, 16, 16) + bounds: [100, 100, 260, 260] + - type: "stacking-context" + transform-origin: 635 235 + transform: rotate-z(-45) + filters: blur(3, 3) + items: + - image: checkerboard(2, 16, 16) + bounds: [500, 100, 260, 260] diff --git a/gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml b/gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml new file mode 100644 index 0000000000..528a440e5b --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/segments-bug-ref.yaml @@ -0,0 +1,22 @@ +--- +root: + items: + - + type: "stacking-context" + items: + - + type: clip + id: 4 + complex: + - + rect: [12, 12, 130, 130] + radius: 20 + "clip-mode": clip + - + type: "stacking-context" + items: + - + bounds: [12, 12, 130, 130] + clip-chain: [4] + type: rect + color: 0 128 0 1.0000 diff --git a/gfx/wr/wrench/reftests/transforms/segments-bug.yaml b/gfx/wr/wrench/reftests/transforms/segments-bug.yaml new file mode 100644 index 0000000000..6ac89e094b --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/segments-bug.yaml @@ -0,0 +1,26 @@ +# Test that opaque/alpha segments are correctly calculated +# when the clip is in a different (but compatible) coordinate +# space from the primitive. +--- +root: + items: + - + type: "stacking-context" + items: + - + type: clip + id: 4 + complex: + - + rect: [12, 12, 130, 130] + radius: 20 + "clip-mode": clip + - + type: "stacking-context" + transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 12, 12, 0, 1] + items: + - + bounds: [0, 0, 130, 130] + type: rect + color: 0 128 0 1.0000 + clip-chain: [4] diff --git a/gfx/wr/wrench/reftests/transforms/singular-ref.yaml b/gfx/wr/wrench/reftests/transforms/singular-ref.yaml new file mode 100644 index 0000000000..4d31e4f89c --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/singular-ref.yaml @@ -0,0 +1,28 @@ +--- +root: + items: + - + bounds: [0, 0, 200, 200] + "clip-rect": [0, 0, 200, 200] + type: clip + id: 2 + "content-size": [200, 200] + - + bounds: [0, 100, 100, 100] + "clip-rect": [0, 100, 100, 100] + clip-chain: [2] + type: rect + color: blue + - + bounds: [100, 0, 100, 100] + "clip-rect": [100, 0, 100, 100] + clip-chain: [2] + type: rect + color: green + - + bounds: [100, 100, 100, 100] + "clip-rect": [100, 100, 100, 100] + clip-chain: [2] + type: rect + color: red + diff --git a/gfx/wr/wrench/reftests/transforms/singular.yaml b/gfx/wr/wrench/reftests/transforms/singular.yaml new file mode 100644 index 0000000000..9778518695 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/singular.yaml @@ -0,0 +1,39 @@ +--- +root: + items: + - + bounds: [0, 0, 200, 200] + "clip-rect": [0, 0, 200, 200] + type: clip + id: 2 + "content-size": [200, 200] + - + bounds: [10, 10, 80, 80] + clip-chain: [2] + type: "stacking-context" + transform: [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] + items: + - + bounds: [0, 0, 80, 80] + "clip-rect": [0, 0, 80, 80] + type: rect + color: black + - + bounds: [0, 100, 100, 100] + "clip-rect": [0, 100, 100, 100] + clip-chain: [2] + type: rect + color: blue + - + bounds: [100, 0, 100, 100] + "clip-rect": [100, 0, 100, 100] + clip-chain: [2] + type: rect + color: green + - + bounds: [100, 100, 100, 100] + "clip-rect": [100, 100, 100, 100] + clip-chain: [2] + type: rect + color: red + diff --git a/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml new file mode 100644 index 0000000000..a2e8972981 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d-ref.yaml @@ -0,0 +1,19 @@ +--- +root: + items: + - + type: "stacking-context" + transform: translate(10, 10.5, 0) + items: + - + type: "stacking-context" + transform: translate(10, 10, 0) + items: + - + bounds: [10, 10.5, 200, 1] + type: rect + color: red + - + bounds: [10, 0, 200, 1] + type: rect + color: red diff --git a/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml new file mode 100644 index 0000000000..cd2cd8b1a7 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/snapped-preserve-3d.yaml @@ -0,0 +1,21 @@ +--- +root: + items: + - + type: "stacking-context" + transform: translate(10, 10.5, 0) + "transform-style": "preserve-3d" + items: + - + type: "stacking-context" + transform: translate(10, 10, 0) + "transform-style": "preserve-3d" + items: + - + bounds: [10, 10.5, 200, 1] + type: rect + color: red + - + bounds: [10, 0, 200, 1] + type: rect + color: red diff --git a/gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml b/gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml new file mode 100644 index 0000000000..be50589d2a --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/strange-w-ref.yaml @@ -0,0 +1,12 @@ +--- +root: + items: + - type: stacking-context + bounds: [50, 50, 600, 600] + perspective: 20 + items: + - type: stacking-context + items: + - type: rect + bounds: [25, 25, 50, 50] + color: red diff --git a/gfx/wr/wrench/reftests/transforms/strange-w.yaml b/gfx/wr/wrench/reftests/transforms/strange-w.yaml new file mode 100644 index 0000000000..8e2a71b197 --- /dev/null +++ b/gfx/wr/wrench/reftests/transforms/strange-w.yaml @@ -0,0 +1,15 @@ +# don't assume w=1 when checking if the transform is just a translation + +--- +root: + items: + - type: stacking-context + bounds: [50, 50, 600, 600] + perspective: 20 + items: + - type: stacking-context + transform: [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,2] + items: + - type: rect + bounds: [50, 50, 100, 100] + color: red -- cgit v1.2.3