summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_context.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-11-30 13:30:15 +0900
committerChristopher Michael <cp.michael@samsung.com>2018-12-06 12:06:16 -0500
commitb4f9f1b263eca4b71a9b48b16314ee0561378827 (patch)
tree85eb533d179a9754e6e53c4de7247bc831a0b4e6 /src/modules/evas/engines/gl_common/evas_gl_context.c
parent33b8e5157a25b73a0729055ecd22b17e97781e11 (diff)
evas gl: Remove single-line pipe code of gl commands.
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
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c43
1 files changed, 5 insertions, 38 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 577d00db9b..2877007f42 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -8,7 +8,6 @@
8#endif 8#endif
9 9
10#define PRG_INVALID NULL 10#define PRG_INVALID NULL
11#define GLPIPES 1
12 11
13static int tbm_sym_done = 0; 12static int tbm_sym_done = 0;
14int _evas_engine_GL_common_log_dom = -1; 13int _evas_engine_GL_common_log_dom = -1;
@@ -1014,12 +1013,12 @@ evas_gl_common_context_new(void)
1014 s = (const char *)glGetString(GL_RENDERER); 1013 s = (const char *)glGetString(GL_RENDERER);
1015 if (s) 1014 if (s)
1016 { 1015 {
1017 if (strstr(s, "PowerVR SGX 540")) 1016 if (strstr(s, "PowerVR SGX 540"))
1018 shared->info.tune.pipes.max = DEF_PIPES_SGX_540; 1017 shared->info.tune.pipes.max = DEF_PIPES_SGX_540;
1019 else if (strstr(s, "NVIDIA Tegra 3")) 1018 else if (strstr(s, "NVIDIA Tegra 3"))
1020 shared->info.tune.pipes.max = DEF_PIPES_TEGRA_3; 1019 shared->info.tune.pipes.max = DEF_PIPES_TEGRA_3;
1021 else if (strstr(s, "NVIDIA Tegra")) 1020 else if (strstr(s, "NVIDIA Tegra"))
1022 shared->info.tune.pipes.max = DEF_PIPES_TEGRA_2; 1021 shared->info.tune.pipes.max = DEF_PIPES_TEGRA_2;
1023 } 1022 }
1024 if (!getenv("EVAS_GL_MAPBUFFER")) 1023 if (!getenv("EVAS_GL_MAPBUFFER"))
1025 { 1024 {
@@ -1775,7 +1774,6 @@ _push_mask(Evas_Engine_GL_Context *gc, const int pn, int nm, Evas_GL_Texture *mt
1775 _push_mask(gc, pn, nm, mtex, mx, my, mw, mh, msam, nms); \ 1774 _push_mask(gc, pn, nm, mtex, mx, my, mw, mh, msam, nms); \
1776 } while(0) 1775 } while(0)
1777 1776
1778#ifdef GLPIPES
1779static int 1777static int
1780pipe_region_intersects(Evas_Engine_GL_Context *gc, int n, 1778pipe_region_intersects(Evas_Engine_GL_Context *gc, int n,
1781 int x, int y, int w, int h) 1779 int x, int y, int w, int h)
@@ -1809,7 +1807,6 @@ pipe_region_intersects(Evas_Engine_GL_Context *gc, int n,
1809 } 1807 }
1810 return 0; 1808 return 0;
1811} 1809}
1812#endif
1813 1810
1814static void 1811static void
1815pipe_region_expand(Evas_Engine_GL_Context *gc, int n, 1812pipe_region_expand(Evas_Engine_GL_Context *gc, int n,
@@ -1873,12 +1870,10 @@ _evas_gl_common_context_push(Shader_Type rtype,
1873 if (tex) 1870 if (tex)
1874 current_tex = tex->ptt ? tex->ptt->texture : tex->pt->texture; 1871 current_tex = tex->ptt ? tex->ptt->texture : tex->pt->texture;
1875 1872
1876#ifdef GLPIPES
1877 again: 1873 again:
1878#endif
1879 vertex_array_size_check(gc, gc->state.top_pipe, (rtype == SHD_LINE) ? 2 : 6); 1874 vertex_array_size_check(gc, gc->state.top_pipe, (rtype == SHD_LINE) ? 2 : 6);
1880 pn = gc->state.top_pipe; 1875 pn = gc->state.top_pipe;
1881#ifdef GLPIPES 1876
1882 if (!((pn == 0) && (gc->pipe[pn].array.num == 0))) 1877 if (!((pn == 0) && (gc->pipe[pn].array.num == 0)))
1883 { 1878 {
1884 int found = 0; 1879 int found = 0;
@@ -1927,34 +1922,6 @@ _evas_gl_common_context_push(Shader_Type rtype,
1927 goto again; 1922 goto again;
1928 } 1923 }
1929 } 1924 }
1930#else
1931 if (!((gc->pipe[pn].region.type == rtype)
1932 && (!tex || gc->pipe[pn].shader.cur_tex == current_tex)
1933 /* && (!texa || gc->pipe[pn].shader.cur_texa == current_texa) */
1934 && (!texm || ((gc->pipe[i].shader.cur_texm == texm->pt->texture)
1935 && (gc->pipe[i].shader.mask_smooth == mask_smooth)))
1936 && (gc->pipe[pn].shader.prog == prog)
1937 && (gc->pipe[pn].shader.smooth == smooth)
1938 && (gc->pipe[pn].shader.blend == blend)
1939 && (gc->pipe[pn].shader.render_op == gc->dc->render_op)
1940 && (gc->pipe[pn].shader.clip == clip)
1941 && (!clip || ((gc->pipe[pn].shader.cx == cx)
1942 && (gc->pipe[pn].shader.cy == cy)
1943 && (gc->pipe[pn].shader.cw == cw)
1944 && (gc->pipe[pn].shader.ch == ch)))))
1945 {
1946 shader_array_flush(gc);
1947 }
1948 if ((tex) && (((tex->im) && (tex->im->native.data)) || tex->pt->dyn.img))
1949 {
1950 if (gc->pipe[pn].array.im != tex->im)
1951 {
1952 shader_array_flush(gc);
1953 gc->pipe[pn].array.im = tex->im;
1954 }
1955 }
1956#endif
1957
1958 return pn; 1925 return pn;
1959} 1926}
1960 1927