[evas_gl] calculate flip flag before rotating 12/114812/2
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 15 Feb 2017 07:03:31 +0000 (16:03 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 17 Feb 2017 04:06:45 +0000 (20:06 -0800)
Change-Id: Ib87ec907cac0ea3c3a776c43d4b1dac1221ce474

src/modules/evas/engines/gl_common/evas_gl_context.c

index 08b58c2..2d8049e 100644 (file)
@@ -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;