fix pixman wrappers where image size and alloc size differ.
authorCarsten Haitzler <raster@rasterman.com>
Wed, 16 Jan 2013 06:32:34 +0000 (06:32 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Wed, 16 Jan 2013 06:32:34 +0000 (06:32 +0000)
SVN revision: 82856

ChangeLog
NEWS
src/lib/evas/common/evas_image_main.c

index 421e2e3..882aae4 100644 (file)
--- 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 (file)
--- 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.
index 6692a2d..0677bfa 100644 (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;