Sync with open source - fix render problem
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Thu, 9 Aug 2012 14:46:47 +0000 (23:46 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Tue, 14 Aug 2012 12:58:58 +0000 (21:58 +0900)
src/lib/canvas/evas_map.c
src/lib/engines/common/evas_draw_main.c
src/lib/engines/common/evas_font_ot.c
src/lib/engines/common/evas_image_main.c

index 7aca505..205acf3 100644 (file)
@@ -40,7 +40,6 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
 
    // WARN: Do not merge below code to SLP until it is fixed.
    // It has an infinite loop bug.
-#if 0
    if (obj->prev.map)
      {
         if (obj->prev.map != obj->cur.map)
@@ -70,7 +69,6 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
      }
    else
       ch = 1;
-#endif
 
    p = obj->cur.map->points;
    p_end = p + obj->cur.map->count;
@@ -88,7 +86,7 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
         if (y < yy1) yy1 = y;
         if (y > yy2) yy2 = y;
      }
-// this causes clip-out bugs now mapped objs canbe opaque!!!
+// this causes clip-out bugs now mapped objs canbe opaque!!!   
 //   // add 1 pixel of fuzz around the map region to ensure updates are correct
 //   x1 -= 1; yy1 -= 1;
 //   x2 += 1; yy2 += 1;
index 66af8bd..28b54cd 100755 (executable)
@@ -187,9 +187,18 @@ evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x
    if (mask->pixman.im)
      pixman_image_unref(mask->pixman.im);
    
-   mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h,
-                                             (uint32_t *)mask->mask.mask,
-                                              w * 4);
+   if (mask->cache_entry.flags.alpha)
+     {
+        mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, 
+                                                   (uint32_t *)mask->mask.mask,
+                                                   w * 4);
+     }
+   else
+     {
+        mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h, 
+                                                   (uint32_t *)mask->mask.mask,
+                                                   w * 4);
+     }
 #endif
 
 }
@@ -197,6 +206,8 @@ evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x
 EAPI void
 evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc)
 {
+   dc->mask.mask = NULL;
+
 #ifdef HAVE_PIXMAN
    RGBA_Image *mask;
    mask = (RGBA_Image *)dc->mask.mask;
@@ -207,7 +218,6 @@ evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc)
         mask->pixman.im = NULL;
      }
 #endif
-   dc->mask.mask = NULL;
 }
 
 
index 3e22603..9ed92c7 100644 (file)
@@ -294,19 +294,10 @@ evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
         slen = len;
      }
 
-#if HB_VERSION_CHECK(0,7,0)
-   buffer = hb_buffer_create(slen);
-#else
    buffer = hb_buffer_create();
-#endif
    hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get());
-#if HB_VERSION_CHECK(0,7,0)
-   hb_buffer_set_language(buffer, hb_language_from_string(
-            evas_common_language_from_locale_get()));
-#else
    hb_buffer_set_language(buffer, hb_language_from_string(
             evas_common_language_from_locale_get(), -1));
-#endif
    hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]);
    hb_buffer_set_direction(buffer,
          (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ?
index dcf8dfb..b6735dc 100755 (executable)
@@ -349,14 +349,30 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie)
    RGBA_Image *im = (RGBA_Image *)ie;
 
    if (im->pixman.im) pixman_image_unref(im->pixman.im);
-
-   im->pixman.im = pixman_image_create_bits
-     (
-        PIXMAN_a8r8g8b8,
-        im->cache_entry.w, im->cache_entry.h,
-        im->image.data,
-        im->cache_entry.w * 4
-     );
+   if (im->cache_entry.flags.alpha)
+     {
+        im->pixman.im = pixman_image_create_bits
+        (
+// FIXME: endianess determines this
+            PIXMAN_a8r8g8b8,
+//            PIXMAN_b8g8r8a8,
+            im->cache_entry.w, im->cache_entry.h,
+            im->image.data,
+            im->cache_entry.w * 4
+        );
+     }
+   else
+     {
+        im->pixman.im = pixman_image_create_bits
+        (
+// FIXME: endianess determines this
+            PIXMAN_x8r8g8b8,
+//            PIXMAN_b8g8r8x8,
+            im->cache_entry.w, im->cache_entry.h,
+            im->image.data,
+            im->cache_entry.w * 4
+        );
+     }
 # else
    (void)ie;
 # endif