From: Carsten Haitzler Date: Wed, 16 Jan 2013 06:32:34 +0000 (+0000) Subject: fix pixman wrappers where image size and alloc size differ. X-Git-Tag: submit/devel/efl/20131022.203902~2226 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b86a5cd30fa15164f1201d023e75b03fe8e01ac0;p=platform%2Fupstream%2Fefl.git fix pixman wrappers where image size and alloc size differ. SVN revision: 82856 --- diff --git a/ChangeLog b/ChangeLog index 421e2e3..882aae4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-01-16 Carsten Haitzler (The Rasterman) + + * Fixed pixman image wrapping to handle allocated size instead + of image size (unless allocated is 0/wrong). + 2013-01-15 Paulo Alcantara (pcacjr) * Evas engines: Introduce multi_font_draw() function diff --git a/NEWS b/NEWS index 34437a0..853f042 100644 --- a/NEWS +++ b/NEWS @@ -118,3 +118,4 @@ Fixes: * Evas textblock: Fixed issue and simplified cursor_geometry_get. * Evas text: Fixed issue with horiz advance. * Evas text utils: Fixed issue with no-harfbuzz bidi. + * Fixed pixman surface alloc where allocated and image size differ. diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c index 6692a2d..0677bfa 100644 --- a/src/lib/evas/common/evas_image_main.c +++ b/src/lib/evas/common/evas_image_main.c @@ -313,8 +313,16 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie) #ifdef HAVE_PIXMAN # ifdef PIXMAN_IMAGE RGBA_Image *im = (RGBA_Image *)ie; - + int w, h; + if (im->pixman.im) pixman_image_unref(im->pixman.im); + w = ie->allocated.w; + h = ie->allocated.h; + if ((w <= 0) || (h <= 0)) + { + w = im->cache_entry.w; + h = im->cache_entry.h; + } if (im->cache_entry.flags.alpha) { im->pixman.im = pixman_image_create_bits @@ -322,10 +330,7 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie) // FIXME: endianess determines this PIXMAN_a8r8g8b8, // PIXMAN_b8g8r8a8, - im->cache_entry.w, im->cache_entry.h, - im->image.data, - im->cache_entry.w * 4 - ); + w, h, im->image.data, w * 4); } else { @@ -334,10 +339,7 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie) // FIXME: endianess determines this PIXMAN_x8r8g8b8, // PIXMAN_b8g8r8x8, - im->cache_entry.w, im->cache_entry.h, - im->image.data, - im->cache_entry.w * 4 - ); + w, h, im->image.data, w * 4); } # else (void)ie;