compositor: Don't rely on surface->clip to cull overlay obscured damage
Before this change, surface->clip would contain the region of this the
surface that is obscured by opaque containing of other surfaces in any
plane. If a surface was obscured only by a surface in another plane and
the renderer was told to draw that region, the rendering would be
clipped because of that.
This patch changes the clip to be plane specific, so that it contains
only the region of the surface obscured by other surfaces in the same
plane. We also calculate a per plane clip, so that we don't tell the
renderer to draw regions of the primary plane that are obscured by
other planes. This damage remains on the primary plane until the its
clip changes so that they are not obscured anymore.
diff --git a/src/compositor.h b/src/compositor.h
index 89f0639..ef52d88 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -267,7 +267,7 @@
struct weston_plane {
pixman_region32_t damage;
- pixman_region32_t opaque;
+ pixman_region32_t clip;
int32_t x, y;
struct wl_list link;
};