Bug 1555483 - Part 5: Add wrench reftests for SVG filters and update test expectations r=gw

Differential Revision: https://phabricator.services.mozilla.com/D35742

--HG--
rename : gfx/wr/wrench/reftests/filters/filter-flood-ref.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood-ref.yaml
rename : gfx/wr/wrench/reftests/filters/filter-flood.yaml => gfx/wr/wrench/reftests/filters/svg-filter-flood.yaml
extra : moz-landing-system : lando
This commit is contained in:
Connor Brewster 2019-07-10 22:37:48 +00:00
parent 65b65c54ba
commit 3f078809f7
20 changed files with 428 additions and 2 deletions

View File

@ -44,4 +44,14 @@ skip_on(android) == filter-mix-blend-mode.yaml filter-mix-blend-mode-ref.yaml #
!= filter-drop-shadow-huge.yaml blank.yaml
== filter-blur-scaled.yaml filter-blur-scaled-ref.yaml
skip_on(android) == filter-blur-scaled-xonly.yaml filter-blur-scaled-xonly.png # fails on Android emulator and Pixel2
== filter-flood.yaml filter-flood-ref.yaml
skip_on(android,emulator) == svg-filter-component-transfer.yaml filter-component-transfer-ref.yaml # fails on Android emulator
== svg-filter-flood.yaml svg-filter-flood-ref.yaml
skip_on(android) == svg-filter-blend.yaml svg-filter-blend-ref.yaml
skip_on(android,device) == svg-filter-color-matrix.yaml filter-color-matrix-ref.yaml # fails on Pixel2
platform(linux,mac) == draw_calls(8) color_targets(8) alpha_targets(0) svg-filter-blur.yaml filter-blur.png # Extra draw call is due to render task graph workaround
platform(linux,mac) == svg-filter-drop-shadow.yaml svg-filter-drop-shadow.png
== fuzzy(1,10000) svg-srgb-to-linear.yaml srgb-to-linear-ref.yaml
platform(linux,mac) == fuzzy(4,28250) svg-filter-drop-shadow-rotate.yaml svg-filter-drop-shadow-rotate-ref.yaml
platform(linux,mac) == svg-filter-blur-transforms.yaml svg-filter-blur-transforms.png
platform(linux,mac) == svg-filter-drop-shadow-on-viewport-edge.yaml svg-filter-drop-shadow-on-viewport-edge.png
platform(linux,mac) == svg-filter-drop-shadow-perspective.yaml svg-filter-drop-shadow-perspective.png

View File

@ -0,0 +1,21 @@
---
root:
items:
- type: stacking-context
bounds: [0, 0, 50, 250]
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [0, 255, 0, 1]
- type: rect
bounds: [0, 50, 50, 50]
color: [40, 20, 2, 1]
- type: rect
bounds: [0, 100, 50, 50]
color: [20, 10, 155, 1]
- type: rect
bounds: [0, 150, 50, 50]
color: [255, 222, 156, 1]
- type: rect
bounds: [0, 200, 50, 50]
color: [255, 245, 151, 1]

View File

@ -0,0 +1,83 @@
# Tests various blend modes using the blend filter primitive.
---
root:
items:
- type: stacking-context
bounds: [0, 0, 50, 250]
filter-primitives:
- type: flood
color: [255, 255, 255, 1]
color-space: srgb
- type: blend
in1: original
in2: 0
color-space: srgb
blend-mode: difference
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [255, 0, 255, 1]
- type: stacking-context
bounds: [0, 0, 50, 250]
filter-primitives:
- type: flood
color: [51, 51, 51, 1]
color-space: srgb
- type: blend
in1: original
in2: 0
color-space: srgb
blend-mode: multiply
items:
- type: rect
bounds: [0, 50, 50, 50]
color: [200, 100, 10, 1]
- type: stacking-context
bounds: [0, 0, 50, 250]
filter-primitives:
- type: flood
color: [255, 10, 156, 1]
color-space: srgb
- type: blend
in1: original
in2: 0
color-space: srgb
blend-mode: darken
items:
- type: rect
bounds: [0, 100, 50, 50]
color: [20, 222, 155, 1]
- type: stacking-context
bounds: [0, 0, 50, 250]
filter-primitives:
- type: flood
color: [255, 10, 156, 1]
color-space: srgb
- type: blend
in1: original
in2: 0
color-space: srgb
blend-mode: lighten
items:
- type: rect
bounds: [0, 150, 50, 50]
color: [20, 222, 155, 1]
- type: stacking-context
bounds: [0, 0, 50, 250]
filter-primitives:
- type: flood
color: [255, 10, 156, 1]
color-space: srgb
- type: blend
in1: original
in2: 0
color-space: srgb
blend-mode: exclusion
items:
- type: rect
bounds: [0, 200, 50, 50]
color: [0, 255, 24, 1]

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,15 @@
---
root:
items:
- type: stacking-context
bounds: [0, 100, 300, 300]
transform: scale-x(0.1) rotate-z(45)
filter-primitives:
- type: blur
radius: 10
in: previous
color-space: srgb
items:
- type: rect
color: red
bounds: 0 0 256 256

View File

@ -0,0 +1,13 @@
---
root:
items:
- type: stacking-context
bounds: [100, 100, 300, 300]
filter-primitives:
- type: blur
radius: 10
in: previous
color-space: srgb
items:
- image: "firefox.png"
bounds: 20 20 256 256

View File

@ -0,0 +1,54 @@
---
root:
items:
- type: stacking-context
bounds: [0, 0, 120, 120]
items:
- type: rect
bounds: [0, 0, 120, 120]
color: [0, 0, 0, 1]
- type: stacking-context
bounds: [10, 10, 50, 50]
filter-primitives:
- type: color-matrix
in: previous
color-space: srgb
matrix: [0.393, 0.686, 0.534, 0,
0.189, 0.168, 0.131, 0,
0.349, 0.272, 0, 0,
0, 0, 0, 1,
0, 0, 0, 0]
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [255, 0, 0, 1]
- type: stacking-context
bounds: [10, 60, 50, 50]
filter-primitives:
- type: color-matrix
in: previous
color-space: srgb
matrix: [-1, 0, 0, 0,
0, -1, 0, 0,
0, 0, -1, 0,
0, 0, 0, 1,
1, 1, 1, 0]
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [0, 255, 0, 1]
- type: stacking-context
bounds: [60, 10, 50, 50]
filter-primitives:
- type: color-matrix
in: previous
color-space: srgb
matrix: [0, 0, 1, 0,
0, 1, 0, 0,
1, 0, 0, 0,
0, 0, 0, 1,
0, 0, 0, 0]
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [0, 0, 255, 1]

View File

@ -0,0 +1,128 @@
---
root:
items:
- type: stacking-context
bounds: [0, 0, 50, 250]
items:
- type: stacking-context
bounds: [0, 0, 50, 50]
filter-primitives:
- type: component-transfer
color-space: srgb
in: previous
filter-datas:
- - - Identity
- Identity
- Identity
- Identity
- []
- []
- []
- []
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [255, 0, 255, 1]
- type: stacking-context
bounds: [0, 50, 50, 50]
filter-primitives:
- type: component-transfer
color-space: srgb
in: previous
filter-datas:
- - - Table
- Table
- Table
- Identity
- - "1"
- "1"
- "0"
- "0"
- - "0"
- "0"
- "1"
- "1"
- - "0"
- "1"
- "1"
- "0"
- []
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [173, 255, 47, 1]
- type: stacking-context
bounds: [0, 100, 50, 50]
filter-primitives:
- type: component-transfer
color-space: srgb
in: previous
filter-datas:
- - - Discrete
- Discrete
- Discrete
- Identity
- - "1"
- "1"
- "0"
- "0"
- - "0"
- "0"
- "1"
- "1"
- - "0"
- "1"
- "1"
- "0"
- []
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [0, 255, 255, 1]
- type: stacking-context
bounds: [0, 150, 50, 50]
filter-primitives:
- type: component-transfer
color-space: srgb
in: previous
filter-datas:
- - - Linear
- Linear
- Linear
- Identity
- - "0.5"
- "0.25"
- - "0.5"
- "0"
- - "0.5"
- "0.5"
- []
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [255, 255, 0, 1]
- type: stacking-context
bounds: [0, 200, 50, 50]
filter-primitives:
- type: component-transfer
color-space: srgb
in: previous
filter-datas:
- - - Gamma
- Gamma
- Gamma
- Identity
- - "2"
- "5"
- "-1"
- - "2"
- "3"
- "0"
- - "2"
- "1"
- "-1.75"
- []
items:
- type: rect
bounds: [0, 0, 50, 50]
color: [135, 206, 235, 1]

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,16 @@
---
root:
items:
- type: stacking-context
bounds: [10, 10, 400, 400]
filter-primitives:
- type: drop-shadow
offset: [10, 10]
radius: 20
color: [255, 0, 0, 1]
in: previous
color-space: srgb
items:
- type: rect
bounds: 0 0 256 256
color: green

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,22 @@
# Tests SVG drop shadows with perspective transforms
---
root:
items:
- type: stacking-context
perspective: 100
perspective-origin: 100 50
items:
- type: "stacking-context"
transform-origin: 0 250
transform: rotate-x(15)
filter-primitives:
- type: drop-shadow
color: red
offset: [20, 20]
radius: 10
in: previous
color-space: srgb
items:
- type: rect
color: blue
bounds: 0 0 200 200

View File

@ -0,0 +1,11 @@
# Tests SVG drop shadows with transforms
---
root:
items:
- type: stacking-context
bounds: [100, 100, 400, 400]
filters: drop-shadow([73, 73], 20, [255, 0, 0, 1])
transform: rotate-z(45)
items:
- image: "firefox.png"
bounds: 0 0 256 256

View File

@ -0,0 +1,17 @@
# Tests SVG drop shadows with transforms
---
root:
items:
- type: stacking-context
bounds: [100, 100, 400, 400]
transform: rotate-z(45)
filter-primitives:
- type: drop-shadow
in: previous
offset: [73, 73]
radius: 20
color: [255, 0, 0, 1]
color-space: srgb
items:
- image: "firefox.png"
bounds: 0 0 256 256

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -0,0 +1,16 @@
# Tests that SVG drop shadows are working properly
---
root:
items:
- type: stacking-context
bounds: [100, 100, 400, 400]
filter-primitives:
- type: drop-shadow
in: previous
offset: [73, 73]
radius: 20
color: [255, 0, 0, 1]
color-space: srgb
items:
- image: "firefox.png"
bounds: 0 0 256 256

View File

@ -0,0 +1,20 @@
# this test ensures that a sRGB -> linear-RGB -> sRGB results in no change (with exception to rounding error)
---
root:
items:
- type: stacking-context
bounds: [0, 0, 300, 100]
filter-primitives:
- type: identity
in: previous
color-space: linear-rgb
items:
- type: rect
bounds: [100, 0, 100, 100]
color: [200, 200, 200, 1.0]
- type: rect
bounds: [100, 0, 100, 100]
color: [100, 100, 100, 1.0]
- type: rect
bounds: [200, 0, 100, 100]
color: [50, 50, 50, 1.0]

View File

@ -10,7 +10,7 @@ platform(linux,mac) == rounded-corners.yaml rounded-corners.png
platform(linux,mac) fuzzy(1,17500) color_targets(3) alpha_targets(1) == mask-atomicity.yaml mask-atomicity-ref.yaml
platform(linux,mac) fuzzy(1,17500) == mask-atomicity-tiling.yaml mask-atomicity-ref.yaml
platform(linux,mac) == mask-perspective.yaml mask-perspective.png
skip_on(android,emulator) == fuzzy(1,6) mask-perspective-tiling.yaml mask-perspective.yaml # Android emulator: GL error 502 at tex_sub_image_3d_pbo, fails on opt
skip_on(android,emulator) == fuzzy(1,7) mask-perspective-tiling.yaml mask-perspective.yaml # Android emulator: GL error 502 at tex_sub_image_3d_pbo, fails on opt
platform(linux,mac) == checkerboard.yaml checkerboard.png
skip_on(android) == checkerboard.yaml checkerboard-tiling.yaml # Android emulator: GL error 502 at blit_framebuffer, fails on opt emulator and on a Pixel2
== missing-mask.yaml missing-mask-ref.yaml