From 614715d84f7258dbd8db3e9ac7d207885cc6d51c Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Wed, 15 Feb 2017 16:03:31 +0900 Subject: [PATCH] [evas_gl] calculate flip flag before rotating Change-Id: Ib87ec907cac0ea3c3a776c43d4b1dac1221ce474 --- .../evas/engines/gl_common/evas_gl_context.c | 45 +++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index 08b58c2..2d8049e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -2240,6 +2240,29 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, && (ens) && (ens->type == EVAS_NATIVE_SURFACE_TBM)) { double tmp; + + if (tex->im && + (tex->im->native.flip == EVAS_IMAGE_FLIP_HORIZONTAL)) + { + sx = tex->im->w - sw - sx; + } + + if (tex->im->native.flip == EVAS_IMAGE_FLIP_VERTICAL) + { + sy = tex->im->h - sh - sy; + } + + if (tex->im->native.flip == EVAS_IMAGE_FLIP_TRANSVERSE) + { + double tmp; + + SWAP(&sw, &sh, tmp); + SWAP(&sx, &sy, tmp); + + sx = tex->im->w - sw - sx; + sy = tex->im->h - sh - sy; + } + if (tex->im->native.rot == EVAS_IMAGE_ORIENT_90) { tmp = sx; sx = (tex->im->h - sy - sh) * tex->im->w / (double)tex->im->h; @@ -2266,28 +2289,6 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, sh = tmp * tex->im->h / (double)tex->im->w; } - if (tex->im && - (tex->im->native.flip == EVAS_IMAGE_FLIP_HORIZONTAL)) - { - sx = tex->im->w - sw - sx; - } - - if (tex->im->native.flip == EVAS_IMAGE_FLIP_VERTICAL) - { - sy = tex->im->h - sh - sy; - } - - if (tex->im->native.flip == EVAS_IMAGE_FLIP_TRANSVERSE) - { - double tmp; - - SWAP(&sw, &sh, tmp); - SWAP(&sx, &sy, tmp); - - sx = tex->im->w - sw - sx; - sy = tex->im->h - sh - sy; - } - if (tex->im->native.flip == EVAS_IMAGE_FLIP_TRANSPOSE) { double tmp; -- 2.7.4