summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaegeun Park <haegeun.park@samsung.com>2016-11-17 15:23:32 +0900
committerHaegeun Park <haegeun.park@samsung.com>2017-01-11 18:20:39 +0900
commit7f445db1645d57d7d8d7e1ddd7b86ca7b458844f (patch)
tree846a9bee364778ae7b892a16810103c678ec02bd
parentb8b1e0747f90f29c22441aea76d3b8599aabc22b (diff)
downloadefl-7f445db1645d57d7d8d7e1ddd7b86ca7b458844f.tar.gz
evas/gl_common: (GL thread) Context push now checks changes of perspective viewport (PATCHSET 4/5)
It's one of the work of avoiding shader_array_flush() with perspective viewport. Change-Id: If90ad953f0f2a13a99c2b6a78e00bc4ad93f0e26
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c20
1 files changed, 20 insertions, 0 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 9f6b0436a8..1a39579962 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -1697,6 +1697,7 @@ _evas_gl_common_context_push(Shader_Type rtype,
Evas_GL_Texture *tex,
Evas_GL_Texture *texm,
Evas_GL_Program *prog,
+ int foc, int z0, int px, int py,
int x, int y, int w, int h,
Eina_Bool blend,
Eina_Bool smooth,
@@ -1727,6 +1728,10 @@ _evas_gl_common_context_push(Shader_Type rtype,
&& (!tex || gc->pipe[i].shader.cur_tex == current_tex)
&& (!texm || ((gc->pipe[i].shader.cur_texm == texm->pt->texture)
&& (gc->pipe[i].shader.mask_smooth == mask_smooth)))
+ && (gc->pipe[i].viewport.foc == foc)
+ && (gc->pipe[i].viewport.z0 == z0)
+ && (gc->pipe[i].viewport.px == px)
+ && (gc->pipe[i].viewport.py == py)
&& (gc->pipe[i].shader.prog == prog)
&& (gc->pipe[i].shader.smooth == smooth)
&& (gc->pipe[i].shader.blend == blend)
@@ -1792,6 +1797,11 @@ _evas_gl_common_context_push(Shader_Type rtype,
}
#endif
+ gc->pipe[pn].viewport.foc = foc;
+ gc->pipe[pn].viewport.z0 = z0;
+ gc->pipe[pn].viewport.px = px;
+ gc->pipe[pn].viewport.py = py;
+
return pn;
}
@@ -1822,6 +1832,7 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_LINE,
gc, NULL, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
EINA_FALSE,
@@ -1887,6 +1898,7 @@ evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_RECT,
gc, NULL, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
EINA_FALSE,
@@ -2103,6 +2115,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_IMAGE,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
smooth,
@@ -2304,6 +2317,7 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_FONT,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
1,
0,
@@ -2383,6 +2397,7 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_YUV,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
smooth,
@@ -2462,6 +2477,7 @@ evas_gl_common_context_yuv_709_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_YUV_709,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
smooth,
@@ -2541,6 +2557,7 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_YUY2,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
smooth,
@@ -2618,6 +2635,7 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_NV12,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
smooth,
@@ -2702,6 +2720,7 @@ evas_gl_common_context_rgb_a_pair_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_RGB_A_PAIR,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
EINA_TRUE,
smooth,
@@ -2893,6 +2912,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
pn = _evas_gl_common_context_push(SHD_MAP,
gc, tex, mtex,
prog,
+ 0, 0, 0, 0,
x, y, w, h,
blend,
smooth,