Move working tests to new directory

These are tests that are working on both GL and Cairo now.

Some tests got black boxes over the areas that aren't easy to compare.
This commit is contained in:
Benjamin Otte 2019-03-19 08:16:07 +01:00
parent 4d98e96124
commit 08e9725797
19 changed files with 109 additions and 30 deletions

View File

@ -0,0 +1,41 @@
color {
color: white;
bounds: 50 70 80 90;
}
clip {
clip: 60 80 60 70;
child: rounded-clip {
clip: 20 50 100 100 / 50;
child: color {
bounds: 20 50 100 100;
color: red;
}
}
}
debug {
message: "clipped out area";
child: container {
color {
bounds: 115 80 5 45;
color: black;
}
color {
bounds: 110 121 5 11;
color: black;
}
color {
bounds: 99 129 11 11;
color: black;
}
color {
bounds: 91 140 11 5;
color: black;
}
color {
bounds: 60 145 35 5;
color: black;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,36 @@
color {
bounds: 40 40 70 70;
color: transparent;
}
clip {
clip: 50 50 50 50;
child: opacity {
opacity: 0.4;
child: rounded-clip {
clip: 50 50 100 100 / 50;
child: color {
bounds: 50 50 100 100;
color: red;
}
}
}
}
debug {
message: "clipped out area";
child: container {
color {
bounds: 50 70 10 30;
color: black;
}
color {
bounds: 55 55 20 20;
color: black;
}
color {
bounds: 70 50 30 10;
color: black;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 527 B

View File

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 391 B

View File

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 391 B

View File

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 761 B

View File

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

View File

@ -1,10 +0,0 @@
clip {
clip: 60 80 60 70;
child: rounded-clip {
clip: 20 50 100 100 / 50;
child: color {
bounds: 20 50 100 100;
color: red;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

View File

@ -1,13 +0,0 @@
clip {
clip: 50 50 50 50;
child: opacity {
opacity: 0.4;
child: rounded-clip {
clip: 50 50 100 100 / 50;
child: color {
bounds: 50 50 100 100;
color: red;
}
}
}
}

View File

@ -40,21 +40,14 @@ test('nodes (cairo)', test_render_nodes,
# Interesting render nodes proven to be rendered 'correctly' by the GL renderer.
gl_tests = [
['outset shadow simple', 'outset_shadow_simple'],
['outset shadow offset x', 'outset_shadow_offsetx'],
['outset shadow offset y', 'outset_shadow_offsety'],
['outset shadow offset both', 'outset_shadow_offset_both'],
['outset shadow rounded1', 'outset_shadow_rounded1'],
['outset shadow rounded2', 'outset_shadow_rounded2'],
['outset shadow rounded top', 'outset_shadow_rounded_top'],
['outset shadow blurred simple', 'outset_shadow_blurred_simple'],
['outset shadow blurred small', 'outset_shadow_blurred_small'],
['outset shadow blurred offset', 'outset_shadow_blurred_offset'],
['Crossfade simple', 'cross_fade'],
['Clipped rounded clip', 'clipped_rounded_clip'],
['gradient simple', 'gradient_simple'],
['gradient clipped', 'gradient_clipped'],
['offscreen opacity', 'opacity_clip'],
]
foreach gl_test : gl_tests
@ -72,6 +65,38 @@ foreach gl_test : gl_tests
suite: 'gsk')
endforeach
compare_render_tests = [
'clipped_rounded_clip',
'opacity_clip',
'outset_shadow_offset_both',
'outset_shadow_offset_x',
'outset_shadow_offset_y',
'outset_shadow_rounded_top',
'outset_shadow_simple',
]
renderers = [
'opengl',
'cairo',
]
foreach renderer : renderers
foreach test : compare_render_tests
test(renderer + ' ' + test, compare_render,
args: [join_paths(meson.current_source_dir(), 'compare', test + '.node'),
join_paths(meson.current_source_dir(), 'compare', test + '.png')],
env: [ 'GIO_USE_VOLUME_MONITOR=unix',
'GSETTINGS_BACKEND=memory',
'GTK_CSD=1',
'G_ENABLE_DIAGNOSTIC=0',
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
'GSK_RENDERER=' + renderer
],
suite: [ 'gsk', 'gsk-compare', 'gsk-' + renderer, 'gsk-compare-' + renderer ])
endforeach
endforeach
node_parser_tests = [
'crash1',
'crash2',