diff options
Diffstat (limited to 'gfx/wr/wrench/reftests')
22 files changed, 372 insertions, 3 deletions
diff --git a/gfx/wr/wrench/reftests/filters/reftest.list b/gfx/wr/wrench/reftests/filters/reftest.list index 493cb6ff8c..c0b3a74131 100644 --- a/gfx/wr/wrench/reftests/filters/reftest.list +++ b/gfx/wr/wrench/reftests/filters/reftest.list @@ -1,3 +1,12 @@ +fuzzy(2,10000) == svgfe-blenddarken-linear.yaml svgfe-blenddarken-linear-ref.yaml +fuzzy(2,10000) == svgfe-blendmultiply-linear.yaml svgfe-blendmultiply-linear-ref.yaml +fuzzy(2,10000) == svgfe-blendnormal-linear.yaml svgfe-blendnormal-linear-ref.yaml +fuzzy(2,10000) == svgfe-colormatrix.yaml svgfe-colormatrix-ref.yaml +fuzzy(4,10000) == svgfe-dropshadow.yaml svgfe-dropshadow-ref.yaml +fuzzy(2,10000) == svgfe-opacity-linear.yaml svgfe-opacity-linear-ref.yaml +fuzzy(2,10000) == svgfe-opacity.yaml svgfe-opacity-ref.yaml +fuzzy(12,10000) == svgfe-subregion-bigger.yaml svgfe-subregion-bigger-ref.yaml +fuzzy(12,10000) == svgfe-subregion-offset-stacking-context.yaml svgfe-subregion-offset-stacking-context-ref.yaml == filter-grayscale.yaml filter-grayscale-ref.yaml platform(linux,mac) == draw_calls(7) color_targets(7) alpha_targets(0) filter-blur.yaml filter-blur.png platform(linux,mac) == filter-blur-downscale-fractional.yaml filter-blur-downscale-fractional.png diff --git a/gfx/wr/wrench/reftests/filters/svgfe-blenddarken-linear-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-blenddarken-linear-ref.yaml new file mode 100644 index 0000000000..4e828d2c98 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-blenddarken-linear-ref.yaml @@ -0,0 +1,9 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [164, 82, 95, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-blenddarken-linear.yaml b/gfx/wr/wrench/reftests/filters/svgfe-blenddarken-linear.yaml new file mode 100644 index 0000000000..063cbc89d9 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-blenddarken-linear.yaml @@ -0,0 +1,21 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: flood + linear: true + subregion: [10, 10, 100, 100] + color: [192, 96, 128, 1] + - svgfe: blenddarken + linear: true + subregion: [0, 0, 120, 120] + in: 0 + in2: 2 + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [128, 64, 32, 0.5] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-blendmultiply-linear-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-blendmultiply-linear-ref.yaml new file mode 100644 index 0000000000..de4d203f40 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-blendmultiply-linear-ref.yaml @@ -0,0 +1,9 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [153, 70, 93, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-blendmultiply-linear.yaml b/gfx/wr/wrench/reftests/filters/svgfe-blendmultiply-linear.yaml new file mode 100644 index 0000000000..c7deb2b4a7 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-blendmultiply-linear.yaml @@ -0,0 +1,21 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: flood + linear: true + subregion: [10, 10, 100, 100] + color: [192, 96, 128, 1] + - svgfe: blendmultiply + linear: true + subregion: [10, 10, 100, 100] + in: 0 + in2: 2 + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [128, 64, 32, 0.5] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-blendnormal-linear-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-blendnormal-linear-ref.yaml new file mode 100644 index 0000000000..4e828d2c98 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-blendnormal-linear-ref.yaml @@ -0,0 +1,9 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [164, 82, 95, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-blendnormal-linear.yaml b/gfx/wr/wrench/reftests/filters/svgfe-blendnormal-linear.yaml new file mode 100644 index 0000000000..c872e5031d --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-blendnormal-linear.yaml @@ -0,0 +1,21 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: flood + linear: true + subregion: [10, 10, 100, 100] + color: [192, 96, 128, 1] + - svgfe: blendnormal + linear: true + subregion: [10, 10, 100, 100] + in: 0 + in2: 2 + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [128, 64, 32, 0.5] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-colormatrix-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-colormatrix-ref.yaml new file mode 100644 index 0000000000..b0246c8333 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-colormatrix-ref.yaml @@ -0,0 +1,10 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + items: + - type: rect + bounds: [10, 10, 100, 100] + # note: this is sRGB converted to match linear result of sRGB 64*2,32*2,16*2 + color: [90, 47, 26, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-colormatrix.yaml b/gfx/wr/wrench/reftests/filters/svgfe-colormatrix.yaml new file mode 100644 index 0000000000..be0da63a59 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-colormatrix.yaml @@ -0,0 +1,18 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: colormatrix + linear: true, + subregion: [0, 0, 120, 120] + in: 0 + # note this is transposed to be suitable for shader, not SVG order + matrix: [2,0,0,0, 0,2,0,0, 0,0,2,0, 0,0,0,1, 0,0,0,0] + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [64, 32, 16, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-dropshadow-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-dropshadow-ref.yaml new file mode 100644 index 0000000000..e14d6a1f18 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-dropshadow-ref.yaml @@ -0,0 +1,16 @@ +--- +root: + items: + - type: stacking-context + bounds: [10, 10, 200, 200] + filters: drop-shadow([20, 20], 10, red) + items: + - type: stacking-context + bounds: [10, 10, 200, 200] + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [127, 127, 127, 1] + - type: rect + bounds: [50, 30, 100, 60] + color: [192, 192, 192, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-dropshadow.yaml b/gfx/wr/wrench/reftests/filters/svgfe-dropshadow.yaml new file mode 100644 index 0000000000..b2f5278c1f --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-dropshadow.yaml @@ -0,0 +1,27 @@ +--- +root: + items: + - type: stacking-context + bounds: [10, 10, 510, 510] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: dropshadow + linear: false + subregion: [-20, -20, 320, 320] + color: red + dx: 20 + dy: 20 + std_deviation_x: 10 + std_deviation_y: 10 + in: 0 + items: + - type: stacking-context + bounds: [10, 10, 150, 110] + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [127, 127, 127, 1] + - type: rect + bounds: [50, 30, 100, 60] + color: [192, 192, 192, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-opacity-linear-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-opacity-linear-ref.yaml new file mode 100644 index 0000000000..08fa2f4706 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-opacity-linear-ref.yaml @@ -0,0 +1,9 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + items: + - type: rect + bounds: [10, 10, 100, 100] + color: [128, 64, 32, 0.5] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-opacity-linear.yaml b/gfx/wr/wrench/reftests/filters/svgfe-opacity-linear.yaml new file mode 100644 index 0000000000..8ac12d37c7 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-opacity-linear.yaml @@ -0,0 +1,20 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 120, 120] + items: + - type: stacking-context + bounds: [10, 10, 100, 100] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: opacity + linear: true, + subregion: [0, 0, 400, 400] + in: 0 + value: 0.5 + items: + - type: rect + bounds: [0, 0, 100, 100] + color: [128, 64, 32, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-opacity-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-opacity-ref.yaml new file mode 100644 index 0000000000..1395fb6dd3 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-opacity-ref.yaml @@ -0,0 +1,9 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + items: + - type: rect + bounds: [0, 0, 100, 100] + color: [128, 0, 0, 0.5] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-opacity.yaml b/gfx/wr/wrench/reftests/filters/svgfe-opacity.yaml new file mode 100644 index 0000000000..c8c3ab7dba --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-opacity.yaml @@ -0,0 +1,17 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 100, 100] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: opacity + linear: false + subregion: [0, 0, 100, 100] + in: 0 + value: 0.5 + items: + - type: rect + bounds: [0, 0, 100, 100] + color: [128, 0, 0, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-subregion-bigger-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-subregion-bigger-ref.yaml new file mode 100644 index 0000000000..676518b4ed --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-subregion-bigger-ref.yaml @@ -0,0 +1,15 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 50, 200, 100] + items: + - type: rect + bounds: [10, 10, 80, 100] + color: [255, 0, 0, 0.7] + - type: rect + bounds: [50, 10, 80, 100] + color: [0, 255, 0, 0.7] + - type: rect + bounds: [90, 10, 80, 100] + color: [0, 0, 255, 0.7] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-subregion-bigger.yaml b/gfx/wr/wrench/reftests/filters/svgfe-subregion-bigger.yaml new file mode 100644 index 0000000000..a54c3f59ea --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-subregion-bigger.yaml @@ -0,0 +1,35 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 50, 800, 800] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: flood + linear: false + # this is expected to be at 10,60 + subregion: [10, 10, 80, 100] + color: [255, 0, 0, 0.7] + - svgfe: flood + linear: false + # this is expected to be at 50,60 + subregion: [50, 10, 80, 100] + color: [0, 255, 0, 0.7] + - svgfe: blendnormal + linear: false + # this is expected to be at 10,60 + subregion: [10, 10, 160, 100] + in: 3 + in2: 2 + - svgfe: blendnormal + linear: false + # this is expected to be at 10,60 + subregion: [10, 10, 160, 100] + in: 0 + in2: 4 + items: + - type: rect + # this is expected to be at 90,60 + bounds: [90, 10, 80, 100] + color: [0, 0, 255, 0.7] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-subregion-offset-stacking-context-ref.yaml b/gfx/wr/wrench/reftests/filters/svgfe-subregion-offset-stacking-context-ref.yaml new file mode 100644 index 0000000000..0020079d51 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-subregion-offset-stacking-context-ref.yaml @@ -0,0 +1,21 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 800, 800] + items: + - type: rect + bounds: [0, 200, 800, 5] + color: [64, 64, 64, 1] + - type: rect + bounds: [100, 500, 100, 100] + color: [0, 0, 255, 1] + - type: rect + bounds: [0, 500, 90, 5] + color: [0, 0, 255, 1] + - type: rect + bounds: [0, 0, 90, 5] + color: [255, 0, 0, 1] + - type: rect + bounds: [0, 300, 90, 5] + color: [0, 255, 0, 1] diff --git a/gfx/wr/wrench/reftests/filters/svgfe-subregion-offset-stacking-context.yaml b/gfx/wr/wrench/reftests/filters/svgfe-subregion-offset-stacking-context.yaml new file mode 100644 index 0000000000..106e629432 --- /dev/null +++ b/gfx/wr/wrench/reftests/filters/svgfe-subregion-offset-stacking-context.yaml @@ -0,0 +1,51 @@ +--- +root: + items: + - type: stacking-context + bounds: [0, 0, 800, 800] + items: + - type: stacking-context + bounds: [0, 200, 800, 800] + items: + - type: stacking-context + bounds: [0, 0, 800, 800] + filters: + - svgfe: SourceGraphic + - svgfe: SourceAlpha + - svgfe: flood + color: [64, 64, 64, 1] + # this is expected to show up at 0,200 + subregion: [0, 0, 800, 5] + - svgfe: flood + color: [127, 127, 127, 1] + # this is expected to show up at 100,500 and be completely + # hidden by the blue rect (SourceGraphic) + subregion: [100, 300, 90, 100] + - svgfe: compositeover + linear: false + subregion: [0, 0, 800, 800] + in: 3 + in2: 2 + - svgfe: compositeover + linear: false + subregion: [0, 0, 800, 800] + in: 0 + in2: 4 + items: + - type: rect + # blue rect is expected to show up at 100,500, this should + # hide the gray rect + bounds: [100, 300, 100, 100] + color: [0, 0, 255, 1] + - type: rect + # this is expected to show up at 0,500 + bounds: [0, 300, 90, 5] + color: [0, 0, 255, 1] + - type: rect + # this is expected to show up at 0,0 + bounds: [0, 0, 90, 5] + color: [255, 0, 0, 1] + - type: rect + # this is expected to show up at 0,300 + bounds: [0, 300, 90, 5] + color: [0, 255, 0, 1] diff --git a/gfx/wr/wrench/reftests/gradient/radial-border-radius-large-ref.png b/gfx/wr/wrench/reftests/gradient/radial-border-radius-large-ref.png Binary files differnew file mode 100644 index 0000000000..b86542ad0b --- /dev/null +++ b/gfx/wr/wrench/reftests/gradient/radial-border-radius-large-ref.png diff --git a/gfx/wr/wrench/reftests/gradient/radial-border-radius-large.yaml b/gfx/wr/wrench/reftests/gradient/radial-border-radius-large.yaml new file mode 100644 index 0000000000..ed052f4bb4 --- /dev/null +++ b/gfx/wr/wrench/reftests/gradient/radial-border-radius-large.yaml @@ -0,0 +1,21 @@ +# This test contains a radial gradient with rounded corners. +# The primitive is large enough to exercise the quad nine-patch +# code path. +# In addition the primitive contains a large solid color portion +# causing the gradient optimization to split it into two primitives. +--- +root: + items: + - type: clip + id: 5 + complex: + - rect: [10, 10, 750, 500] + radius: 32 + - type: radial-gradient + bounds: 10 10 750 500 + center: 0 0 + radius: 400 350 + stops: [0.0, red, 1.0, blue] + clip-chain: [5] + + diff --git a/gfx/wr/wrench/reftests/gradient/reftest.list b/gfx/wr/wrench/reftests/gradient/reftest.list index 5c55c29b06..c33fec2ebe 100644 --- a/gfx/wr/wrench/reftests/gradient/reftest.list +++ b/gfx/wr/wrench/reftests/gradient/reftest.list @@ -82,13 +82,14 @@ fuzzy(1,7) == tiling-conic-3.yaml tiling-conic-3-ref.yaml platform(linux,mac) == linear-aligned-border-radius.yaml linear-aligned-border-radius.png # interpolation fuzz from sampling texture-baked gradient ramps platform(linux,mac) fuzzy-range(<=1,*1404) == repeat-border-radius.yaml repeat-border-radius.png +fuzzy(3,6000) == radial-border-radius-large.yaml radial-border-radius-large-ref.png == conic.yaml conic-ref.yaml fuzzy(1,57) == conic-simple.yaml conic-simple.png fuzzy(255,302) == conic-angle.yaml conic-angle.png == conic-center.yaml conic-center.png fuzzy(1,2) == conic-angle-wraparound.yaml conic-angle.yaml -fuzzy-if(env(android,device),254,146) fuzzy-if(not(env(android,device)),1,1) == conic-angle-wraparound-negative.yaml conic-angle.yaml # Android device is Samsung Galaxy A51 +fuzzy-if(env(android,device),255,155) fuzzy-if(not(env(android,device)),1,1) == conic-angle-wraparound-negative.yaml conic-angle.yaml # Android device is Samsung Galaxy A51 fuzzy(1,333) == conic-color-wheel.yaml conic-color-wheel.png # gradient caching tests @@ -118,8 +119,8 @@ fuzzy-range(<=1,1) == gradient_cache_hardstop_clip.yaml gradient_cache_hardstop_ # Exercise the cached gradient scaling code path fuzzy(2,23000) == linear-large.yaml linear-large-ref.yaml == conic-large.yaml conic-large-ref.yaml -fuzzy-if(env(android,device),254,1) == conic-large-hard-stop.yaml conic-large-hard-stop-ref.yaml # Android device is Samsung Galaxy A51 -fuzzy(1,7000) == radial-large.yaml radial-large-ref.png +fuzzy-if(env(android,device),255,1) == conic-large-hard-stop.yaml conic-large-hard-stop-ref.yaml # Android device is Samsung Galaxy A51 +fuzzy(1,80000) == radial-large.yaml radial-large-ref.png # crash tests == linear-far-endpoints.yaml linear-far-endpoints.yaml |