evas: Force shaders pipe flush when using dynamic images (TBM) 60/92960/3 accepted/tizen/common/20161020.173508 accepted/tizen/ivi/20161020.130323 accepted/tizen/mobile/20161020.130155 accepted/tizen/tv/20161020.130242 accepted/tizen/wearable/20161020.130302 submit/tizen/20161020.095955
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 19 Oct 2016 12:51:50 +0000 (21:51 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 19 Oct 2016 14:25:47 +0000 (07:25 -0700)
This prevents a rare issue where an SVG resource would not show up
in some circumstance. The case was 100% reproducible but very
rare nonetheless.

Change-Id: I37939fdcedaef2e6fc573c26939e2238bec267af

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

index 1e8c4a1..5f286c6 100644 (file)
@@ -1977,7 +1977,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
    int yinvert = 0;
    Shader_Type shd_in = SHD_IMAGE;
    int tex_target = GL_TEXTURE_2D;
-   Evas_Native_Surface *ens;
+   Evas_Native_Surface *ens = NULL;
    if (tex->im)
      {
         if (tex->im->native.data)
@@ -2330,6 +2330,9 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
 
    if (!nomul)
      PUSH_6_COLORS(pn, r, g, b, a);
+
+   if (pt->dyn.img)
+     shader_array_flush(gc);
 }
 
 void
@@ -2718,6 +2721,9 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
    PUSH_MASK(pn, mtex, mx, my, mw, mh, masksam);
    if (!nomul)
      PUSH_6_COLORS(pn, r, g, b, a);
+
+   if (tex->pt->dyn.img)
+     shader_array_flush(gc);
 }
 
 void
@@ -3055,7 +3061,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
 
    PUSH_MASK(pn, mtex, mx, my, mw, mh, masksam);
 
-   if (!flat)
+   if (!flat || tex->pt->dyn.img)
      {
         shader_array_flush(gc);
         gc->foc = 0;