generic-poky/meta/recipes-graphics/libmatchbox/files/16bppfixes.patch

39 lines
1.2 KiB
Diff
Raw Normal View History

Upstream-Status: Accepted
recipes: Add Upstream-Status to multiple recipes gtk+: Add Upstream-Status ed: Add Upstream-Status gnome-common: Add Upstream-Status libmatchbox: Add Upstream-Status matchbox-wm: Add Upstream-Status x11vnc: Add Upstream-Status xtscal: Add Upstream-Status eds-dbus: Add Upstream-Status matchbox-desktop: Add Upstream-Status matchbox-keyboard: Add Upstream-Status matchbox-stroke: Add Upstream-Status matchbox-theme-sato: Add Upstream-Status owl-video-widget: Add Upstream-Status beecrypt: Add Upstream-Status gnome-icon-theme: Add Upstream-Status tslib: Add Upstream-Status libowl-av: Add Upstream-Status sato-icon-theme: Add Upstream-Status web-webkit: Add Upstream-Status metacity: Add Upstream-Status apr: Add Upstream-Status gdk-pixbuf: Add Upstream-Status pcmanfm: Add Upstream-Status gpgme: Add Upstream-Status eee-acpi-scripts: Add Upstream-Status libgalago: Add Upstream-Status python-pygtk: Add Upstream-Status gnome-mime-data: Add Upstream-Status clutter: Add Upstream-Status clutter-gtk: Add Upstream-Status tidy: Add Upstream-Status mutter: Add Upstream-Status xcursor-transparent-theme: Add Upstream-Status leafpad: Add Upstream-Status matchbox-config-gtk: Add Upstream-Status contacts: Add Upstream-Status dates: Add Upstream-Status web: Add Upstream-Status webkit: Add Upstream-Status - Also removed empty fix_im.patch apr-util: Add Upstream-Status libcroco: Add Upstream-Status liboil: Add Upstream-Status libxslt: Add Upstream-Status libglade: Add Upstream-Status gnome-terminal: Add Upstream-Status xev: Add Upstream-Status claws-mail: Add Upstream-Status clipboard-manager: Add Upstream-Status epdfview: Add Upstream-Status kf: Add Upstream-Status qemu: Add Upstream-Status clutter-gst: Add Upstream-Status table: Add Upstream-Status matchbox-panel-2: Add Upstream-Status (From OE-Core rev: 10bdb737c2c4c6996fd035849109a1e07580a6b9) Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-12 00:08:05 +00:00
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);
}
}