summaryrefslogtreecommitdiff
path: root/src/sna/sna_render.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-04-03 12:34:24 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-04-03 12:36:22 +0100
commit04851e4210d2d71542359c14d4b68d0851b36326 (patch)
tree6b905b56e82f8b70eac86e9b059db75eb3f02f96 /src/sna/sna_render.h
parent87a672dafd9d6f47f31b77b406b7f0fb2b4030ac (diff)
sna/gen3: Convert the clear-color from picture->format to a8r8g8b8
The shaders treat colours as an argb value, however the clear color is stored in the pixmap's native format (a8, r5g6b5, x8r8g8b8 etc). So before using the value of the clear color as a solid we need to convert it into the a8r8g8b8 format. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48204 Reported-by: Paul Neumann <paul104x@yahoo.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47308 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.h')
-rw-r--r--src/sna/sna_render.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sna/sna_render.h b/src/sna/sna_render.h
index 73ef5680..9c49281d 100644
--- a/src/sna/sna_render.h
+++ b/src/sna/sna_render.h
@@ -485,6 +485,12 @@ sna_render_get_gradient(struct sna *sna,
uint32_t sna_rgba_for_color(uint32_t color, int depth);
uint32_t sna_rgba_to_color(uint32_t rgba, uint32_t format);
+Bool sna_get_rgba_from_pixel(uint32_t pixel,
+ uint16_t *red,
+ uint16_t *green,
+ uint16_t *blue,
+ uint16_t *alpha,
+ uint32_t format);
Bool sna_picture_is_solid(PicturePtr picture, uint32_t *color);
void no_render_init(struct sna *sna);