[PATCH weston 2/5] compositor-drm: Check surface's outputs when assigning overlays

Ander Conselvan de Oliveira conselvan2 at gmail.com
Tue Jun 26 07:09:12 PDT 2012


Check if the output passed to drm_output_prepare_overlay_surface() does
actually contain the surface and fail if it doesn't. Also fail if a
surface spans multiple outputs since clearing the damage will cause the
portion that is not in an overlay to not be updated at all.
---
 src/compositor-drm.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 42d971f..5543462 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -530,6 +530,9 @@ drm_output_prepare_overlay_surface(struct weston_output *output_base,
 	if (c->sprites_are_broken)
 		return -1;
 
+	if (es->output_mask != (1u << output_base->id))
+		return -1;
+
 	if (surface_is_primary(ec, es))
 		return -1;
 
-- 
1.7.9.5



More information about the wayland-devel mailing list