* subcompositor.c (IsDamageComplicated): Consider 10 rects as
complex damage.
* surface.c (ApplyScale): Don't dereference subsurface list data
as role.
* tests/subsurface_test.c (enum test_kind, test_names): Add
complex damage and scaling tests.
(LAST_TEST): Set to SUBSURFACE_SCALE_KIND.
(test_single_step): Implement new tests.
* subsurface.c (EarlyCommit): Clear pending_commit after merging
cached state.
* tests/subsurface_test.c (test_single_step): Add test that
found this problem.
* compositor.h (struct _RoleFuncs): Get rid of note_desync_child
and co.
* frame_clock.c (StartFrame): Fix typo.
* subsurface.c (struct _Subsurface): New field
`should_be_desync'.
(NoteDesyncChild, NoteChildSynced): Delete functions.
(IsParentSynchronous): New function.
(SetSync1, NoteSubsurfaceDesynchronous, NoteSubsurfaceTeardown):
New functions.
(SetSync): Make all children synchronous when required.
(SetDesync): Desynchronize all children if possible; otherwise,
keep the surface synchronous but set the `should_be_desync'
flag.
(EarlyCommit): Merge pending state if required.
(Setup): Call SetSync1 to make children synchronous.
(Teardown): Call NoteSubsurfaceTeardown to make children
desynchronous as required.
(GetSubsurface): Stop setting
note_child_synced/note_desync_child.
* surface.c (InternalCommit1): New function.
(InternalCommit): Move state merging logic to InternalCommit1.
(XLSurfaceMergeCachedState): New function.
* xdg_surface.c (struct _XdgRole): Remove `n_desync_children'.
(UpdateFrameRefreshPrediction): Resort to counting the number of
children on each frame instead.
(Setup, NoteFrame, NoteChildSynced, NoteDesyncChild, HandleFreeze)
(XLGetXdgSurface): Stop counting sync/desync children.
* tests/subsurface_test.c (enum test_kind, test_names): Add
SUBSURFACE_DESYNC_KIND.
(LAST_TEST): Set to SUBSURFACE_DESYNC_KIND.
(test_single_step): Implement SUBSURFACE_DESYNC_KIND.
* subcompositor.c (ViewMap, ViewUnmap): Union view inferior
bounds whenever possible, instead of garbaging the
subcompositor.
* tests/subsurface_test.c (enum test_kind): New test
`SUBSURFACE_STACKING_1_KIND'.
(test_names): Add new name.
(LAST_TEST): Set to SUBSURFACE_STACKING_1_KIND.
(test_single_step): Implement SUBSURFACE_STACKING_1_KIND.
* subcompositor.c (DoCull): Fix leak of temp region upon
encountering opaque view.
* tests/subsurface_test.c (enum test_kind, test_names): New test
SUBSURFACE_GROW_SHRINK_KIND.
(LAST_TEST): Make it the last test.
(test_single_step): Implement SUBSURFACE_GROW_SHRINK_KIND.