summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2018-02-23 16:08:10 -0500
committerAdam Jackson <ajax@redhat.com>2018-02-26 16:46:34 -0500
commit8171d4c2d67b2990a278dc018ac32534c3afe606 (patch)
treef83e0536b3a40b0ed3eb32679e8c897891016736 /fb
parent92272378064a878ce7a62852b877d674bcad89cd (diff)
render: Store and use all 16bpc of precision for solid pixels (v2.1)
This plumbs the full width color for solid pictures through to fb, exa, and glamor. External drivers and acceleration code may wish to make a similar change for sufficiently new servers. v2: Don't break ABI (Michel Dänzer) v2.1: Use the (correct) full color in fb too (Michel Dänzer) Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'fb')
-rw-r--r--fb/fbpict.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 7ea0b668f..9797447b4 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -220,20 +220,10 @@ static pixman_image_t *
create_solid_fill_image(PicturePtr pict)
{
PictSolidFill *solid = &pict->pSourcePict->solidFill;
- pixman_color_t color;
- CARD32 a, r, g, b;
+ /* pixman_color_t and xRenderColor have the same layout */
+ pixman_color_t *color = (pixman_color_t *)&solid->fullcolor;
- a = (solid->color & 0xff000000) >> 24;
- r = (solid->color & 0x00ff0000) >> 16;
- g = (solid->color & 0x0000ff00) >> 8;
- b = (solid->color & 0x000000ff) >> 0;
-
- color.alpha = (a << 8) | a;
- color.red = (r << 8) | r;
- color.green = (g << 8) | g;
- color.blue = (b << 8) | b;
-
- return pixman_image_create_solid_fill(&color);
+ return pixman_image_create_solid_fill(color);
}
static pixman_image_t *