jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=78cd7336aaa6b063cc76b7bf6fb9d866186bc83f

commit 78cd7336aaa6b063cc76b7bf6fb9d866186bc83f
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Mon Apr 13 21:07:21 2015 +0900

    Evas GL masking: Skip fast path if colorspace is not supported
    
    Masking in GL assumes only one texture to sample from. This means
    RGB+Alpha and YUV types are not supported. While it would
    make sense for RGB+Alpha, it doesn't make any sense for YUV (because
    masks are alpha planes and YUV is opaque...)
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 0de8e2a..ed03737 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -989,6 +989,24 @@ eng_image_scaled_update(void *data EINA_UNUSED, void 
*scaled, void *image,
 
    if (!src) return NULL;
 
+   // masking will work only with single texture images
+   switch (src->cs.space)
+     {
+      case EVAS_COLORSPACE_AGRY88:
+      case EVAS_COLORSPACE_ARGB8888:
+      case EVAS_COLORSPACE_GRY8:
+      case EVAS_COLORSPACE_RGBA8_ETC2_EAC:
+      case EVAS_COLORSPACE_RGBA_S3TC_DXT1:
+      case EVAS_COLORSPACE_RGBA_S3TC_DXT2:
+      case EVAS_COLORSPACE_RGBA_S3TC_DXT3:
+      case EVAS_COLORSPACE_RGBA_S3TC_DXT4:
+      case EVAS_COLORSPACE_RGBA_S3TC_DXT5:
+        break;
+      default:
+        DBG("cspace %d can't be used for masking's fast path", src->cs.space);
+        return NULL;
+     }
+
    gc = src->gc;
    if (dst && (dst->scaled.origin == src) &&
        (dst->w == dst_w) && (dst->h == dst_h))

-- 


Reply via email to