From 3b4af201008f83aaabf4e8bd0a6b6d51b5538936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 28 Feb 2012 09:19:39 -0500 Subject: [PATCH] compositor: Dont set the opaque region if we have an overall surface alpha --- src/compositor.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 6a1bebd2..a95837e7 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -335,9 +335,13 @@ weston_surface_update_transform_disable(struct weston_surface *surface) surface->geometry.width, surface->geometry.height); - pixman_region32_copy(&surface->transform.opaque, &surface->opaque); - pixman_region32_translate(&surface->transform.opaque, - surface->geometry.x, surface->geometry.y); + if (surface->alpha == 255) { + pixman_region32_copy(&surface->transform.opaque, + &surface->opaque); + pixman_region32_translate(&surface->transform.opaque, + surface->geometry.x, + surface->geometry.y); + } } static int