evas gl: Remove single-line pipe code of gl commands. 12/194212/1
authorHermet Park <hermetpark@gmail.com>
Fri, 30 Nov 2018 04:30:15 +0000 (13:30 +0900)
committerHermet Park <hermetpark@gmail.com>
Fri, 30 Nov 2018 04:38:02 +0000 (13:38 +0900)
Summary:
GLPIPES is proved to use since it's been used for many years as the default.
On the other hand, single-line routine hans't, acutally it's not maintained properly.
Even this single-line routine doesn't compileable right moment.

This patch is one refactoring to clean up code that's not valuable to maintain.

Reviewers: #committers, raster, cedric, ManMower

Reviewed By: #committers, ManMower

Subscribers: ManMower, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7328

Change-Id: Id80ee877544e02959f4606a3c8180637d8c72137

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

index 9972075..85a51f2 100644 (file)
@@ -8,7 +8,6 @@
 #endif
 
 #define PRG_INVALID NULL
-#define GLPIPES 1
 
 static int tbm_sym_done = 0;
 int _evas_engine_GL_common_log_dom = -1;
@@ -992,12 +991,12 @@ static Evas_GL_Shared* _evas_gl_common_shared(Evas_Engine_GL_Context *gc)
   s = (const char *)GL_TH(glGetString, GL_RENDERER);
   if (s)
     {
-       if      (strstr(s, "PowerVR SGX 540"))
-          shared->info.tune.pipes.max = DEF_PIPES_SGX_540;
+       if (strstr(s, "PowerVR SGX 540"))
+         shared->info.tune.pipes.max = DEF_PIPES_SGX_540;
        else if (strstr(s, "NVIDIA Tegra 3"))
-          shared->info.tune.pipes.max = DEF_PIPES_TEGRA_3;
+         shared->info.tune.pipes.max = DEF_PIPES_TEGRA_3;
        else if (strstr(s, "NVIDIA Tegra"))
-          shared->info.tune.pipes.max = DEF_PIPES_TEGRA_2;
+         shared->info.tune.pipes.max = DEF_PIPES_TEGRA_2;
     }
   if (!getenv("EVAS_GL_MAPBUFFER"))
     {
@@ -1890,7 +1889,6 @@ _push_mask(Evas_Engine_GL_Context *gc, const int pn, int nm, Evas_GL_Texture *mt
    _push_mask(gc, pn, nm, mtex, mx, my, mw, mh, msam, nms); \
    } while(0)
 
-#ifdef GLPIPES
 static int
 pipe_region_intersects(Evas_Engine_GL_Context *gc, int n,
                        int x, int y, int w, int h)
@@ -1924,7 +1922,6 @@ pipe_region_intersects(Evas_Engine_GL_Context *gc, int n,
      }
    return 0;
 }
-#endif
 
 static void
 pipe_region_expand(Evas_Engine_GL_Context *gc, int n,
@@ -1989,12 +1986,10 @@ _evas_gl_common_context_push(Shader_Type rtype,
    if (tex)
      current_tex = tex->ptt ? tex->ptt->texture : tex->pt->texture;
 
-#ifdef GLPIPES
  again:
-#endif
    vertex_array_size_check(gc, gc->state.top_pipe, (rtype == SHD_LINE) ? 2 : 6);
    pn = gc->state.top_pipe;
-#ifdef GLPIPES
+
    if (!((pn == 0) && (gc->pipe[pn].array.num == 0)))
      {
         int found = 0;
@@ -2047,33 +2042,6 @@ _evas_gl_common_context_push(Shader_Type rtype,
              goto again;
           }
      }
-#else
-   if (!((gc->pipe[pn].region.type == rtype)
-         && (!tex || gc->pipe[pn].shader.cur_tex == current_tex)
-         /* && (!texa || gc->pipe[pn].shader.cur_texa == current_texa) */
-         && (!texm || ((gc->pipe[i].shader.cur_texm == texm->pt->texture)
-                       && (gc->pipe[i].shader.mask_smooth == mask_smooth)))
-         && (gc->pipe[pn].shader.prog == prog)
-         && (gc->pipe[pn].shader.smooth == smooth)
-         && (gc->pipe[pn].shader.blend == blend)
-         && (gc->pipe[pn].shader.render_op == gc->dc->render_op)
-         && (gc->pipe[pn].shader.clip == clip)
-         && (!clip || ((gc->pipe[pn].shader.cx == cx)
-                       && (gc->pipe[pn].shader.cy == cy)
-                       && (gc->pipe[pn].shader.cw == cw)
-                       && (gc->pipe[pn].shader.ch == ch)))))
-     {
-        shader_array_flush(gc);
-     }
-   if ((tex) && (((tex->im) && (tex->im->native.data)) || tex->pt->dyn.img))
-     {
-        if (gc->pipe[pn].array.im != tex->im)
-          {
-             shader_array_flush(gc);
-             gc->pipe[pn].array.im = tex->im;
-          }
-     }
-#endif
 
    gc->pipe[pn].viewport.foc = foc;
    gc->pipe[pn].viewport.z0 = z0;