summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-03-22 15:12:34 +0000
committerRichard Purdie <richard@openedhand.com>2006-03-22 15:12:34 +0000
commitf72d3a88ef9f90c337222c22138d4af268ad4680 (patch)
treeb81213805ffd0d3ab0de8e770271b41dbc974b0a
parent87421169e9d52570804becb6eb72978363209ade (diff)
downloadopenembedded-core-f72d3a88ef9f90c337222c22138d4af268ad4680.tar.gz
openembedded-core-f72d3a88ef9f90c337222c22138d4af268ad4680.tar.bz2
openembedded-core-f72d3a88ef9f90c337222c22138d4af268ad4680.tar.xz
openembedded-core-f72d3a88ef9f90c337222c22138d4af268ad4680.zip
Add 16bpp fix for libmatchbox for qemu
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@325 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--openembedded/packages/libmatchbox/files/16bppfixes.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/openembedded/packages/libmatchbox/files/16bppfixes.patch b/openembedded/packages/libmatchbox/files/16bppfixes.patch
new file mode 100644
index 000000000..09a034780
--- /dev/null
+++ b/openembedded/packages/libmatchbox/files/16bppfixes.patch
@@ -0,0 +1,36 @@
+Index: libmb/mbpixbuf.c
+===================================================================
+--- libmatchbox/libmb.orig/mbpixbuf.c 2006-02-01 12:45:55.000000000 +0000
++++ libmatchbox/libmb/mbpixbuf.c 2006-03-11 15:20:47.000000000 +0000
+@@ -716,7 +716,13 @@
+ case 15:
+ return ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | ((b & 0xf8) >> 3);
+ case 16:
+- return ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3);
++ switch (pb->byte_order)
++ {
++ case BYTE_ORD_24_RGB:
++ return ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | ((b & 0xf8) >> 3);
++ case BYTE_ORD_24_BGR:
++ return ((b & 0xf8) << 8) | ((g & 0xfc) << 3) | ((r & 0xf8) >> 3);
++ }
+ case 24:
+ case 32:
+ switch (pb->byte_order)
+@@ -1880,12 +1886,11 @@
+ for(y=0; y<img->height; y++)
+ for(x=0; x<img->width; x++)
+ {
+- /* Below is potentially dangerous.
+- */
+- pixel = ( *p | (*(p+1) << 8));
++ internal_16bpp_pixel_to_rgb(p, r, g, b);
++ internal_16bpp_pixel_next(p);
++ a = ((img->has_alpha) ? *p++ : 0xff);
+
+- p += ((img->has_alpha) ? 3 : 2);
+-
++ pixel = mb_pixbuf_get_pixel(pb, r, g, b, a);
+ XPutPixel(img->ximg, x, y, pixel);
+ }
+ }