From 07e73371ef096b42d3a983266105b71ea01b4cc8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Tue, 19 Jun 2007 11:19:43 -0400 Subject: [PATCH] Fix fbStore_b2g3r3(). Pointed out by Dan Amelang --- pixman/pixman-compose.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pixman/pixman-compose.c b/pixman/pixman-compose.c index 63b1677..d870b2a 100644 --- a/pixman/pixman-compose.c +++ b/pixman/pixman-compose.c @@ -1404,7 +1404,8 @@ fbStore_r3g3b2 (pixman_image_t *image, uint8_t *pixel = ((uint8_t *) bits) + x; for (i = 0; i < width; ++i) { Split(READ(values + i)); - WRITE(pixel++, ((r ) & 0xe0) | + WRITE(pixel++, + ((r ) & 0xe0) | ((g >> 3) & 0x1c) | ((b >> 6) )); } @@ -1418,9 +1419,10 @@ fbStore_b2g3r3 (pixman_image_t *image, uint8_t *pixel = ((uint8_t *) bits) + x; for (i = 0; i < width; ++i) { Split(READ(values + i)); - WRITE(pixel++, ((b ) & 0xe0) | + WRITE(pixel++, + ((b ) & 0xc0) | ((g >> 3) & 0x1c) | - ((r >> 6) )); + ((r >> 5) )); } } -- 2.7.4