diff options
Diffstat (limited to 'gfx/wr/wrench/reftests/aa')
-rw-r--r-- | gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml | 6 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml | 48 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/fractional-nine-patch.png | bin | 0 -> 2026 bytes | |||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml | 21 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml | 18 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/fractional-radii.yaml | 54 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/indirect-rotate.png | bin | 0 -> 1472 bytes | |||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/indirect-rotate.yaml | 16 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/reftest.list | 6 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/rotated-line.png | bin | 0 -> 1930 bytes | |||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/rotated-line.yaml | 13 | ||||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/rounded-rects-ref.png | bin | 0 -> 10886 bytes | |||
-rw-r--r-- | gfx/wr/wrench/reftests/aa/rounded-rects.yaml | 56 |
13 files changed, 238 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml b/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml new file mode 100644 index 0000000000..c83fff2a0b --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/aa-dist-bug-ref.yaml @@ -0,0 +1,6 @@ +--- +root: + items: + - type: rect + color: red + bounds: [340, 184, 50, 20] diff --git a/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml b/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml new file mode 100644 index 0000000000..bac51368e9 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/aa-dist-bug.yaml @@ -0,0 +1,48 @@ +# Test that when the AA range is > 1, the AA is correctly applied to +# an ellipse clip. This is a regression test for issue #2576. +# The rectangles below mask out most of the box shadow and rounded +# corners, which are not relevant to what is being tested here. +--- +root: + items: + - type: stacking-context + transform: rotate-z(-45) rotate-x(-60) + transform-origin: 300 300 + items: + - type: box-shadow + bounds: [0, 0, 150, 150] + color: black + offset: [150, 50] + border-radius: 8 + + - type: clip + id: 2 + complex: + - rect: [90, 0, 150, 150] + radius: 8 + + - type: clip-chain + id: 10 + clips: [2] + + - type: rect + color: red + border-radius: 8 + bounds: [90, 0, 150, 150] + clip-chain: 10 + + - type: rect + color: white + bounds: [250, 100, 240, 84] + + - type: rect + color: white + bounds: [250, 204, 240, 70] + + - type: rect + color: white + bounds: [240, 100, 100, 150] + + - type: rect + color: white + bounds: [390, 100, 100, 150] diff --git a/gfx/wr/wrench/reftests/aa/fractional-nine-patch.png b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.png Binary files differnew file mode 100644 index 0000000000..37e1e80496 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.png diff --git a/gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml new file mode 100644 index 0000000000..3fe5d9cb52 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/fractional-nine-patch.yaml @@ -0,0 +1,21 @@ +--- +root: + items: + - bounds: 0 0 450 400 + type: rect + color: white + - type: stacking-context + bounds: 50.0 50.0 0 0 + transform: [0.9999767, 8.142047e-6, 0.0, 0.0, 1.6284093e-5, 0.9999767, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0019226074, 0.0019683838, 0.0, 1.0] + items: + - type: stacking-context + items: + - type: clip + id: 3 + complex: + - rect: [0, 0, 375, 300] + radius: 12 + - type: rect + bounds: 0 0 375 300 + color: red + clip-chain: [3] diff --git a/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml b/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml new file mode 100644 index 0000000000..364d6e7529 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/fractional-radii-ref.yaml @@ -0,0 +1,18 @@ +--- +root: + items: + - type: rect + bounds: 20 50 100 100 + color: blue + + - type: rect + bounds: 140 50 100 100 + color: blue + + - type: rect + bounds: 260 50 100 100 + color: blue + + - type: rect + bounds: 380 50 100 100 + color: blue diff --git a/gfx/wr/wrench/reftests/aa/fractional-radii.yaml b/gfx/wr/wrench/reftests/aa/fractional-radii.yaml new file mode 100644 index 0000000000..cf61cd27b6 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/fractional-radii.yaml @@ -0,0 +1,54 @@ +--- +root: + items: + - type: clip + id: 2 + complex: + - rect: [20, 50, 100, 100] + radius: 0 + - type: clip-chain + id: 10 + clips: [2] + - type: rect + bounds: 20 50 100 100 + color: blue + clip-chain: 10 + + - type: clip + id: 3 + complex: + - rect: [140, 50, 100, 100] + radius: 0.001 + - type: clip-chain + id: 11 + clips: [3] + - type: rect + bounds: 140 50 100 100 + color: blue + clip-chain: 11 + + - type: clip + id: 4 + complex: + - rect: [260, 50, 100, 100] + radius: 0.01 + - type: clip-chain + id: 12 + clips: [4] + - type: rect + bounds: 260 50 100 100 + color: blue + clip-chain: 12 + + - type: clip + id: 5 + complex: + - rect: [380, 50, 100, 100] + radius: 0.1 + - type: clip-chain + id: 13 + clips: [5] + - type: rect + bounds: 380 50 100 100 + color: blue + clip-chain: 13 diff --git a/gfx/wr/wrench/reftests/aa/indirect-rotate.png b/gfx/wr/wrench/reftests/aa/indirect-rotate.png Binary files differnew file mode 100644 index 0000000000..2110c35e15 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/indirect-rotate.png diff --git a/gfx/wr/wrench/reftests/aa/indirect-rotate.yaml b/gfx/wr/wrench/reftests/aa/indirect-rotate.yaml new file mode 100644 index 0000000000..1478c613aa --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/indirect-rotate.yaml @@ -0,0 +1,16 @@ +# Verify that we select correct blend mode for indirect rotated primitives with an +# axis-aligned clip. This allows SWGL to correctly apply the native AA. +--- +root: + items: + - type: clip + bounds: 110 100 180 200 + id: 3 + - bounds: 100 100 200 100 + type: stacking-context + transform: rotate-y(10) rotate-x(30) + clip-chain: [3] + items: + - type: rect + bounds: 0 0 200 100 + color: blue diff --git a/gfx/wr/wrench/reftests/aa/reftest.list b/gfx/wr/wrench/reftests/aa/reftest.list new file mode 100644 index 0000000000..77a05f4f6d --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/reftest.list @@ -0,0 +1,6 @@ +skip_on(android) fuzzy(1,1) fuzzy-if(platform(swgl),4,27) == rounded-rects.yaml rounded-rects-ref.png # Too wide for Android +== aa-dist-bug.yaml aa-dist-bug-ref.yaml +fuzzy-if(env(android,device),6,792) == fractional-radii.yaml fractional-radii-ref.yaml +platform(linux) == fractional-nine-patch.yaml fractional-nine-patch.png +platform(linux) == indirect-rotate.yaml indirect-rotate.png +platform(linux) == rotated-line.yaml rotated-line.png diff --git a/gfx/wr/wrench/reftests/aa/rotated-line.png b/gfx/wr/wrench/reftests/aa/rotated-line.png Binary files differnew file mode 100644 index 0000000000..054ccfda58 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/rotated-line.png diff --git a/gfx/wr/wrench/reftests/aa/rotated-line.yaml b/gfx/wr/wrench/reftests/aa/rotated-line.yaml new file mode 100644 index 0000000000..19f1c2c57f --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/rotated-line.yaml @@ -0,0 +1,13 @@ +# Ensure that under certain transformations with single pixel width +# lines, the AA is applied correctly along the primitive +--- +root: + items: + - + type: stacking-context + transform-origin: 200 200 + transform: rotate(45) + items: + - type: rect + bounds: 200 200 1 200 + color: black diff --git a/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png b/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png Binary files differnew file mode 100644 index 0000000000..73fb98446b --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/rounded-rects-ref.png diff --git a/gfx/wr/wrench/reftests/aa/rounded-rects.yaml b/gfx/wr/wrench/reftests/aa/rounded-rects.yaml new file mode 100644 index 0000000000..9554707e31 --- /dev/null +++ b/gfx/wr/wrench/reftests/aa/rounded-rects.yaml @@ -0,0 +1,56 @@ +--- +root: + items: + - + bounds: 0 0 1000 1000 + type: stacking-context + items: + - type: clip + id: 3 + complex: + - rect: [50, 50, 200, 200] + radius: 8 + - + type: "clip-chain" + id: 10 + clips: [3] + + - type: rect + bounds: 50 50 200 200 + color: red + clip-chain: 10 + + - type: clip + id: 4 + complex: + - rect: [270, 50, 200, 200] + radius: [16, 32, 48, 64] + - + type: "clip-chain" + id: 11 + clips: [4] + + - type: rect + bounds: 270 50 200 200 + color: green + clip-chain: 11 + + - type: clip + id: 5 + complex: + - rect: [490, 50, 500, 500] + radius: { + top-left: [32, 16], + top-right: [40, 24], + bottom-left: [48, 64], + bottom-right: [52, 80], + } + - + type: "clip-chain" + id: 12 + clips: [5] + + - type: rect + bounds: 490 50 500 500 + color: blue + clip-chain: 12
\ No newline at end of file |