summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-15 18:34:54 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-05-17 20:41:34 +0100
commitd0588e0f0efe89e0c8c6c88f591bbe90490f05bf (patch)
tree5fd7bdc115c3a93af1f6279ee34de5e27e91160e
parent8bea2594549023247a37bc897170c274b320ccc6 (diff)
uxa: Force an alpha channel when rendering source fallbacks
As the source may not cover the extents, we need to represent those areas as transparent in the fallback picture, ergo we need an alpha channel. We could be smarter and force a format conversion when necessary, and we could let the backend choose the most appropriate format. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 89f43f69a9c854fb2b82538a8938002675ca19e4) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r--uxa/uxa-render.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index a93b99bd..acba1b15 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -692,6 +692,12 @@ uxa_render_picture(ScreenPtr screen,
PicturePtr picture;
int ret = 0;
+ /* XXX we need a mechanism for the card to choose the fallback format */
+
+ /* force alpha channel in case source does not entirely cover the extents */
+ if (PIXMAN_FORMAT_A(format) == 0)
+ format = PIXMAN_a8r8g8b8; /* available on all hardware */
+
picture = uxa_picture_for_pixman_format(screen, format, width, height);
if (!picture)
return 0;