Evas GL masking: Improve performance with scaled images
authorJean-Philippe Andre <jp.andre@samsung.com>
Thu, 23 Apr 2015 07:12:04 +0000 (16:12 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 24 Apr 2015 02:12:30 +0000 (11:12 +0900)
The GL scaled images is a fast path for masking where
the shader scales masks on the fly.
This optimization actually fixes some issues where the current
texture binding was incorrect.

src/modules/evas/engines/gl_generic/evas_engine.c

index 31eaabc..6ef0d50 100644 (file)
@@ -1175,6 +1175,13 @@ eng_image_scaled_update(void *data EINA_UNUSED, void *scaled, void *image,
      {
         if (dst->scaled.origin == src)
           {
+             if (dst->references == 1)
+               {
+                  dst->w = dst_w;
+                  dst->h = dst_h;
+                  dst->scaled.smooth = smooth;
+                  return dst;
+               }
              src->references++;
              reffed = EINA_TRUE;
           }