From d69e4fbe203d9689fcebc9cd6e3d4e799dd2123e Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Wed, 25 Jun 2014 21:46:49 +0900 Subject: [PATCH] evas/gl - fix to render grayscale with transparency format in gl backened. In case of png, grayscale with transparency format (transparency doesn't mean the png has alpha channel) gl doesn't prepare that format render. In this case, set it argb8888 to convert the data in the png loader. @fix --- src/modules/evas/engines/gl_common/evas_gl_image.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c index ac2163b6a1..7de58157ab 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -221,6 +221,13 @@ _evas_gl_common_image(Evas_Engine_GL_Context *gc, RGBA_Image *im_im, Evas_Image_ // ETC2 is backwards compatible with ETC1 but we prefer ETC2 if (cspace == EVAS_COLORSPACE_ETC1 && gc->shared->info.etc2) cspace = EVAS_COLORSPACE_RGB8_ETC2; + + /* Current GL doesn't support grayscale with transparency + let it convert to argb8888 in loader */ + if ((cspace == EVAS_COLORSPACE_GRY8) && + im_im->cache_entry.flags.alpha) + cspace = EVAS_COLORSPACE_ARGB8888; + im_im->cache_entry.space = cspace; }