aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinkyoung Kim <sleepigmk@gmail.com>2017-04-11 16:20:07 +0900
committerChris Michael <cp.michael@samsung.com>2017-04-11 11:51:50 -0400
commitcf5c823d75be6eb1fc7ada29bd8c682baa6999dd (patch)
tree4466362e8ae7e1334159b3d0d946b2ec50fe43d9
parentevas: If there isn't clipper when recalcing clip, set mask.clip = NULL. (diff)
downloadefl-devs/devilhorns/planes.tar.gz
EvasGL: Do internal make current if context changed.devs/devilhorns/planes
Summary: Before, rsc->current_ctx is always same with ctx. So checking context change was meaningless. From now, it has meaning. Test Plan: App call evas_gl_make_current more than twice in pixels callback. Those surfaces are indirect rendering surface. Reviewers: jpeg, dkdk, wonsik Reviewed By: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D4773
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c
index d558a9dbd2..c4d3541b4f 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
@@ -2460,6 +2460,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
Eina_Bool dbg = EINA_FALSE;
EVGL_Resource *rsc;
int curr_fbo = 0, curr_draw_fbo = 0, curr_read_fbo = 0;
+ Eina_Bool ctx_changed = EINA_FALSE;
// Check the input validity. If either sfc is valid but ctx is NULL, it's also error.
// sfc can be NULL as evas gl supports surfaceless make current
@@ -2550,6 +2551,10 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONTEXT);
return 0;
}
+
+ if (rsc->current_ctx != ctx)
+ ctx_changed = EINA_TRUE;
+
rsc->current_ctx = ctx;
rsc->current_eng = eng_data;
@@ -2807,7 +2812,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
_framebuffer_create(&ctx->surface_fbo, ctx->version);
// Attach fbo and the buffers
- if ((rsc->current_ctx != ctx) || (ctx->current_sfc != sfc) || (rsc->direct.rendered))
+ if ((ctx_changed) || (ctx->current_sfc != sfc) || (rsc->direct.rendered))
{
sfc->current_ctx = ctx;
if ((sfc->direct_mem_opt) && (sfc->direct_override))