mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
testsuite: Add a test for opacity + color-matrix nodes
These are 2x2 combinations that: 1. Use a texture child node vs a color child node This should force an offscreen vs straight up use a texture. 2. Switch opacity and color-matrix Either put the color matrix into the opacity node or put the opacity into the color matrix. This is worth testing because renderers often combine opacity into the color matrix to avoid offscreens. And they do that because applications often create faded out symbolic images, which end up as a combination of these nodes.
This commit is contained in:
parent
abf942efe5
commit
19171c7a89
46
testsuite/gsk/compare/opacity-colormatrix-combinations.node
Normal file
46
testsuite/gsk/compare/opacity-colormatrix-combinations.node
Normal file
@ -0,0 +1,46 @@
|
||||
opacity {
|
||||
opacity: 0.4;
|
||||
child: color-matrix {
|
||||
matrix: matrix3d(0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
|
||||
child: color {
|
||||
bounds: 0 0 50 50;
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
opacity {
|
||||
opacity: 0.4;
|
||||
child: color-matrix {
|
||||
matrix: matrix3d(0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
|
||||
child: texture {
|
||||
bounds: 50 0 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAV0lEQVRoge3PAQ3AMAzAsH78Ofck\
|
||||
Li26bATJszM7P3BuB3zFSI2RGiM1RmqM1BipMVJjpMZIjZEaIzVGaozUGKkxUmOkxkiNkRojNUZq\
|
||||
jNQYqTFSY6TmBQexAmLPVmNqAAAAAElFTkSuQmCC\
|
||||
");
|
||||
}
|
||||
}
|
||||
}
|
||||
color-matrix {
|
||||
matrix: matrix3d(0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
|
||||
child: opacity {
|
||||
opacity: 0.4;
|
||||
child: color {
|
||||
bounds: 0 50 50 50;
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
color-matrix {
|
||||
matrix: matrix3d(0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
|
||||
child: opacity {
|
||||
opacity: 0.4;
|
||||
child: texture {
|
||||
bounds: 50 50 50 50;
|
||||
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAV0lEQVRoge3PAQ3AMAzAsH78Ofck\
|
||||
Li26bATJszM7P3BuB3zFSI2RGiM1RmqM1BipMVJjpMZIjZEaIzVGaozUGKkxUmOkxkiNkRojNUZq\
|
||||
jNQYqTFSY6TmBQexAmLPVmNqAAAAAElFTkSuQmCC\
|
||||
");
|
||||
}
|
||||
}
|
||||
}
|
BIN
testsuite/gsk/compare/opacity-colormatrix-combinations.png
Normal file
BIN
testsuite/gsk/compare/opacity-colormatrix-combinations.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 315 B |
@ -74,6 +74,7 @@ compare_render_tests = [
|
||||
'mask-texture-color-alpha',
|
||||
'nested-rounded-clips',
|
||||
'opacity_clip',
|
||||
'opacity-colormatrix-combinations',
|
||||
'opacity-overdraw',
|
||||
'opacity-overlapping-children',
|
||||
'outset_shadow_offset_both',
|
||||
|
Loading…
Reference in New Issue
Block a user