2017-10-18 00:48:16 +00:00
|
|
|
testexecdir = join_paths(installed_test_bindir, 'gsk')
|
|
|
|
testdatadir = join_paths(installed_test_datadir, 'gsk')
|
|
|
|
|
2017-10-02 04:18:08 +00:00
|
|
|
test_render_nodes = executable(
|
|
|
|
'test-render-nodes',
|
|
|
|
['test-render-nodes.c',
|
|
|
|
'reftest-compare.c'],
|
|
|
|
dependencies: libgtk_dep,
|
2017-10-18 00:48:16 +00:00
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir
|
2017-10-02 04:18:08 +00:00
|
|
|
)
|
2017-10-17 18:50:05 +00:00
|
|
|
|
2017-12-25 11:56:21 +00:00
|
|
|
compare_render = executable(
|
|
|
|
'compare-render',
|
|
|
|
['compare-render.c', 'reftest-compare.c'],
|
|
|
|
dependencies: libgtk_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir
|
|
|
|
)
|
|
|
|
|
2017-10-18 00:48:16 +00:00
|
|
|
test('nodes (cairo)', test_render_nodes,
|
2017-10-18 08:55:02 +00:00
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
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=cairo'
|
|
|
|
],
|
|
|
|
suite: 'gsk')
|
2017-10-17 18:50:49 +00:00
|
|
|
|
2017-12-25 11:56:21 +00:00
|
|
|
# Interesting render nodes proven to be rendered 'correctly' by the GL renderer.
|
|
|
|
gl_tests = [
|
2018-03-14 16:24:28 +00:00
|
|
|
['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'],
|
|
|
|
['outset shadow transformed', 'outset_shadow_translated'],
|
|
|
|
['Transform in Shadow', 'shadow_transform1'],
|
2018-03-15 11:58:51 +00:00
|
|
|
['Crossfade simple', 'cross_fade'],
|
|
|
|
['Crossfade transformed', 'cross_fade_transformed'],
|
2018-03-14 16:24:28 +00:00
|
|
|
['Clipped crossfade', 'clipped_cross_fade'],
|
|
|
|
['Clipped rounded clip', 'clipped_rounded_clip'],
|
|
|
|
['clipped rounded clip2', 'transformed_clipped_rounded_clip'],
|
2018-03-15 10:15:35 +00:00
|
|
|
['gradient simple', 'gradient_simple'],
|
2018-03-15 11:58:51 +00:00
|
|
|
['gradient transformed', 'gradient_transformed'],
|
|
|
|
['gradient clipped', 'gradient_clipped'],
|
2018-12-02 15:15:17 +00:00
|
|
|
['offscreen opacity', 'opacity_clip'],
|
2017-12-25 11:56:21 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach gl_test : gl_tests
|
2017-12-28 15:36:29 +00:00
|
|
|
test('GL ' + gl_test[0], compare_render,
|
2018-03-14 16:24:28 +00:00
|
|
|
args: [join_paths(meson.current_source_dir(), 'gl', gl_test[1] + '.node'),
|
|
|
|
join_paths(meson.current_source_dir(), 'gl', gl_test[1] + '.gl.png')],
|
2017-12-25 11:56:21 +00:00
|
|
|
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=opengl'
|
|
|
|
],
|
|
|
|
suite: 'gsk')
|
|
|
|
endforeach
|
|
|
|
|
2017-10-22 14:58:53 +00:00
|
|
|
if have_vulkan
|
|
|
|
test('nodes (vulkan)', test_render_nodes,
|
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
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=vulkan'
|
|
|
|
],
|
|
|
|
suite: 'gsk')
|
|
|
|
endif
|
2017-10-17 18:50:05 +00:00
|
|
|
|
|
|
|
test_data = [
|
|
|
|
'blendmode.node',
|
|
|
|
'blendmode.png',
|
2017-10-17 18:56:41 +00:00
|
|
|
'blendmode.vulkan.png',
|
2017-10-17 18:50:05 +00:00
|
|
|
'blendmodes.node',
|
|
|
|
'blendmodes.png',
|
2017-10-17 18:56:41 +00:00
|
|
|
'blendmodes.vulkan.png',
|
2017-10-17 18:50:05 +00:00
|
|
|
'cairo.node',
|
|
|
|
'cairo.png',
|
|
|
|
'colors.cairo.png',
|
|
|
|
'colors.node',
|
|
|
|
'colors.vulkan.png',
|
|
|
|
'cross-fade.node',
|
|
|
|
'cross-fade.png',
|
|
|
|
'cross-fades.node',
|
|
|
|
'cross-fades.png',
|
2017-10-17 18:56:41 +00:00
|
|
|
'cross-fades.vulkan.png',
|
2017-10-17 18:50:05 +00:00
|
|
|
'ducky.png',
|
|
|
|
'repeat.node',
|
|
|
|
'repeat.png',
|
|
|
|
'transform.node',
|
|
|
|
'transform.png',
|
2017-10-17 18:56:41 +00:00
|
|
|
'transform.vulkan.png',
|
2017-10-17 17:22:27 +00:00
|
|
|
'opacity.node',
|
|
|
|
'opacity.png',
|
|
|
|
'opacity.vulkan.png',
|
2017-10-17 18:50:05 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if get_option('install-tests')
|
|
|
|
conf = configuration_data()
|
|
|
|
conf.set('libexecdir', gtk_libexecdir)
|
2017-10-18 01:40:53 +00:00
|
|
|
configure_file(input: 'render-nodes-cairo.test.in',
|
|
|
|
output: 'render-nodes-cairo.test',
|
|
|
|
configuration: conf,
|
|
|
|
install_dir: testdatadir)
|
|
|
|
configure_file(input: 'render-nodes-vulkan.test.in',
|
|
|
|
output: 'render-nodes-vulkan.test',
|
2017-10-17 18:50:05 +00:00
|
|
|
configuration: conf,
|
2017-10-18 00:48:16 +00:00
|
|
|
install_dir: testdatadir)
|
2017-10-17 18:50:05 +00:00
|
|
|
|
|
|
|
install_data(test_data, install_dir: testexecdir)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|