cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cbf81fddd195000af7aff04382811ea447bfa1e1
commit cbf81fddd195000af7aff04382811ea447bfa1e1 Author: Cedric BAIL <[email protected]> Date: Mon Mar 17 19:31:36 2014 +0900 evas: handle allocation of ETC1 color space image surface. --- src/lib/evas/common/evas_image_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c index 47a424f..5ac91cc 100644 --- a/src/lib/evas/common/evas_image_main.c +++ b/src/lib/evas/common/evas_image_main.c @@ -125,6 +125,12 @@ _evas_common_rgba_image_surface_size(unsigned int w, unsigned int h, Evas_Colors { case EVAS_COLORSPACE_GRY8: siz = w * h * sizeof(DATA8); break; case EVAS_COLORSPACE_ARGB8888: siz = w * h * sizeof(DATA32); break; + case EVAS_COLORSPACE_ETC1: + // Need to round width and height independently + w += 2; h += 2; // We do duplicate border in ETC1 to have better rendering on GPU. + siz = (w / 4 + (w % 4 ? 1 : 0)) * + (h / 4 + (h % 4 ? 1 : 0)) * 8; + break; default: return -1; } --
