aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-04-13 21:07:21 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-04-14 16:37:12 +0900
commit78cd7336aaa6b063cc76b7bf6fb9d866186bc83f (patch)
treedc129e9a19b93dca9980972e2e1fffe08c8c34b8
parentEmile image: Fix decoding of ETC1+Alpha images (diff)
downloadefl-78cd7336aaa6b063cc76b7bf6fb9d866186bc83f.tar.gz
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...)
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 0de8e2a378..ed037371a8 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))