From 00dff49e13c46517e005611a18f9a846528640d5 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 2 Aug 2014 15:46:22 +0100 Subject: vivante: include alpha channel in pixmaps Always include the alpha channel in pixmap operations. This required as the blit can be used to upload images to the pixmaps which back a Xrender picture, where the alpha channel must be preserved, and because the 2D PE2.0 engine will avoid copying those bits. Signed-off-by: Russell King --- src/vivante.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vivante.c b/src/vivante.c index ff42a79..609730b 100644 --- a/src/vivante.c +++ b/src/vivante.c @@ -86,18 +86,19 @@ void vivante_set_pixmap_bo(PixmapPtr pixmap, struct drm_armada_bo *bo) /* * This is an imprecise conversion to the Vivante GAL format. - * One important thing here is that Pixmaps don't have an - * alpha channel. + * Although pixmaps in X generally don't have an alpha channel, + * we must set the format to include the alpha channel to + * ensure that the GPU copies all the bits. */ switch (pixmap->drawable.bitsPerPixel) { case 16: if (pixmap->drawable.depth == 15) - format = gcvSURF_X1R5G5B5; + format = gcvSURF_A1R5G5B5; else format = gcvSURF_R5G6B5; break; case 32: - format = gcvSURF_X8R8G8B8; + format = gcvSURF_A8R8G8B8; break; default: goto fail; -- cgit v1.2.3