fix bug related to xrgb format
authorPark SangHee <sh15.park@samsung.com>
Tue, 8 May 2012 08:54:31 +0000 (17:54 +0900)
committerPark SangHee <sh15.park@samsung.com>
Tue, 8 May 2012 08:54:31 +0000 (17:54 +0900)
src/lib/engines/common/evas_draw_main.c
src/lib/engines/common/evas_image_main.c [changed mode: 0644->0755]
src/lib/engines/common/evas_scale_sample.c

index eaa3eec..9bb644f 100755 (executable)
@@ -186,18 +186,9 @@ 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);
    
-   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);
-     }
+   mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h,
+                                             (uint32_t *)mask->mask.mask,
+                                              w * 4);
 #endif
 
 }
old mode 100644 (file)
new mode 100755 (executable)
index 9c233b3..0af02fd
@@ -304,30 +304,14 @@ _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);
-   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
-        );
-     }
+
+   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
+     );
 # else
    (void)ie;
 # endif
index c721c5e..e3d7e17 100644 (file)
@@ -282,9 +282,9 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
             ((dc->render_op == _EVAS_RENDER_COPY) ||
                 (dc->render_op == _EVAS_RENDER_BLEND)))
           {
-             pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
-             if (dc->render_op == _EVAS_RENDER_BLEND)
-               op = PIXMAN_OP_OVER;
+             pixman_op_t op = PIXMAN_OP_OVER; // _EVAS_RENDER_BLEND
+             if ((dc->render_op == _EVAS_RENDER_COPY) || (!src->cache_entry.flags.alpha))
+               op = PIXMAN_OP_SRC;
              
              pixman_image_composite(op,
                                     src->pixman.im, NULL,
@@ -301,9 +301,9 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
                      (dc->render_op == _EVAS_RENDER_BLEND)))
           {
              // In case of pixel and color operation.
-             pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
-             if (dc->render_op == _EVAS_RENDER_BLEND)
-               op = PIXMAN_OP_OVER;
+             pixman_op_t op = PIXMAN_OP_OVER; // _EVAS_RENDER_BLEND
+             if ((dc->render_op == _EVAS_RENDER_COPY) || (!src->cache_entry.flags.alpha))
+               op = PIXMAN_OP_SRC;
              
              pixman_image_composite(op,
                                     src->pixman.im, dc->mask.mask->pixman.im,