* tests.[ch]: initialize base so we have a tile cache and add
parameter "gboolean use_cpu_accel" so we can test stuff both with
and without using CPU features.
* tests/test-layer-grouping.c: changed accordingly. Call g_thread_init()
so the tile cache works (and to be on the safe side in general).
* app/core/gimpgrouplayer.[ch]: add gimp_group_layer_suspend_resize()
and gimp_group_layer_resume_resize() and call them around functions
where all a group's children are transformed (translated, resized
etc). This way we go from the worst case of reallocating the
group's projection tiles once for each child down to exactly one
reallocation.
* app/core/Makefile.am
* app/core/core-enums.[ch]
* app/core/core-types.h
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpgrouplayerundo.[ch]: add new undo class
GimpGroupLayerUndo which implements undos for suspend/resume of
group layers and calls them in reverse order when undoing.
Enable us to have regression testing by introducing a core testing
framework that uses the GLib JUnit-like test library.
Do this by adding a new subdir app/tests that will contain all our
tests (it contains one trivial test already). Also add app/tests.[ch]
with a new function gimp_init_for_testing() so that test cases can
easily setup the core object system.
Will enable it again when I fixed it properly, it's clearly a
non-trivial problem that needs some thinking. Disabled for now because
it causes crashes.
Clean up subsystem linking dependencies by
* Rearranging LDADD entries to better match architectural layers
* Being clear about why we need to pass -u in LDFLAGS some times
* Adding FIXMEs when we have broken dependencies
* Introducing a helper variable so we can share LDADD between
gimp-console and gimp
Don't add layer masks to their layers while loading because a newly
loaded group layer's size doesn't match its mask's size. Instead,
attach all layer masks to their layers using g_object_set_data(), and
add them after all layers have been loaded.
When the projectable's size or image type changes, stop the idle
renderer and remove all queued update area because everything needs to
be re-rendered anyway. Also honor the projectable's offset when
invalidating the entire projection after clearing the pyramid.
The optimization here which would change only the group layer's offset
if the extents of the union of its children has not changed is
completely bogus. That case can only happen if one of the chldren was
moved in a way that does not change the extents of all children's
union, but this doesn't mean that the childrens' positions relative to
each other have not changed.
Instead, invalidate the entire projection to at least avoid constant
reallocation of the tile pyramid.
Found by group layer testing hero Tobias Jakobs.
(will have to optimize real translations of the entire group (or of the
only child in the group) differently)
Yes this is pretty lame, but we must prevent write access to these
items under all circumstances, and we have no other way but killing
the plug-in (it should not write to the drawable directly anyway)