mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
8655bc5d8d
`ClutterOffscreenEffect` had been getting the wrong bounding box in the case of clones and descendents of clones, causing visibly incorrect clipping. This was due to `clutter_actor_get_paint_box` only ever being given the source actor during a paint (which is correct) and not the clone. Even if we weren't painting a clone but an offscreened descendent of a clone (like in gnome-shell's desktop zoom), we would get the wrong result. Fortunately we don't need to know the actual clone/actor being painted so don't need to call the problematic `clutter_actor_get_paint_box` at all. The solution is to only keep untransformed rendering in the FBO and leave the correct transformation for later. The correct clone/actor's transformation is already set for us as the current cogl modelview matrix by `clutter_actor_paint`. Bonus optimization: This all means we don't need to keep `last_matrix_drawn` or force a full repaint every time some part of the transformation changes. Because the FBO contents are no longer affected by transformations. As it should be. In other words, offscreen-effected actors can now move around on screen without themselves being repainted. Special thanks to Mai Lavelle for identifying the cause of the problem. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=789050, https://bugzilla.gnome.org/show_bug.cgi?id=659523#c9, https://gitlab.gnome.org/GNOME/mutter/issues/196, https://gitlab.gnome.org/GNOME/mutter/issues/282, https://gitlab.gnome.org/GNOME/gnome-shell/issues/387, https://launchpad.net/bugs/1767648, https://launchpad.net/bugs/1779615
83 lines
2.0 KiB
Meson
83 lines
2.0 KiB
Meson
clutter_tests_conform_srcdir = join_paths(clutter_srcdir, 'tests/conform')
|
|
clutter_tests_conform_builddir = join_paths(clutter_builddir, 'tests/conform')
|
|
|
|
clutter_tests_conform_c_args = [
|
|
'-DG_LOG_DOMAIN="Clutter-Conform"',
|
|
'-DCOGL_DISABLE_DEPRECATION_WARNINGS',
|
|
]
|
|
clutter_tests_conform_c_args += clutter_debug_c_args
|
|
|
|
clutter_tests_conform_link_args = [
|
|
'-Wl,--export-dynamic',
|
|
]
|
|
|
|
clutter_conform_tests_actor_tests = [
|
|
'actor-anchors',
|
|
'actor-destroy',
|
|
'actor-graph',
|
|
'actor-invariants',
|
|
'actor-iter',
|
|
'actor-layout',
|
|
'actor-meta',
|
|
'actor-offscreen-redirect',
|
|
'actor-paint-opacity',
|
|
'actor-pick',
|
|
'actor-shader-effect',
|
|
'actor-size',
|
|
]
|
|
|
|
clutter_conform_tests_classes_tests = [
|
|
'text',
|
|
]
|
|
|
|
clutter_conform_tests_general_tests = [
|
|
'binding-pool',
|
|
'color',
|
|
'interval',
|
|
'model',
|
|
'script-parser',
|
|
'units',
|
|
]
|
|
|
|
clutter_conform_tests_deprecated_tests = [
|
|
'animator',
|
|
'behaviours',
|
|
'group',
|
|
'rectangle',
|
|
'texture',
|
|
]
|
|
|
|
clutter_conform_tests = []
|
|
clutter_conform_tests += clutter_conform_tests_actor_tests
|
|
clutter_conform_tests += clutter_conform_tests_classes_tests
|
|
clutter_conform_tests += clutter_conform_tests_general_tests
|
|
clutter_conform_tests += clutter_conform_tests_deprecated_tests
|
|
|
|
test_env = environment()
|
|
test_env.set('G_TEST_SRCDIR', clutter_tests_conform_srcdir)
|
|
test_env.set('G_TEST_BUILDDIR', clutter_tests_conform_builddir)
|
|
test_env.set('G_ENABLE_DIAGNOSTIC', '0')
|
|
test_env.set('CLUTTER_ENABLE_DIAGNOSTIC', '0')
|
|
test_env.set('CLUTTER_SCALE', '1')
|
|
|
|
foreach test : clutter_conform_tests
|
|
test_executable = executable('@0@'.format(test),
|
|
sources: [
|
|
'@0@.c'.format(test),
|
|
],
|
|
include_directories: clutter_includes,
|
|
c_args: clutter_tests_conform_c_args,
|
|
link_args: clutter_tests_conform_link_args,
|
|
dependencies: [
|
|
clutter_deps,
|
|
libmutter_clutter_dep,
|
|
libmutter_cogl_path_dep
|
|
],
|
|
install: false,
|
|
)
|
|
|
|
test('clutter/conform/@0@'.format(test), test_executable,
|
|
env: test_env
|
|
)
|
|
endforeach
|