fix pixman wrappers where image size and alloc size differ.

SVN revision: 82856
This commit is contained in:
Carsten Haitzler 2013-01-16 06:32:34 +00:00
parent ffafb3602e
commit b86a5cd30f
3 changed files with 17 additions and 9 deletions

View File

@ -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

1
NEWS
View File

@ -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.

View File

@ -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;