diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-15 18:34:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-15 18:34:54 +0100 |
commit | 89f43f69a9c854fb2b82538a8938002675ca19e4 (patch) | |
tree | 331f9ab838436c7d52eea410c45406d90776c888 /uxa | |
parent | 524fd2dd0da8f69d4c3f5aebe3a345fe34af609d (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>
Diffstat (limited to 'uxa')
-rw-r--r-- | uxa/uxa-render.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index ecc95163..d2c11a39 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -729,6 +729,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; |