summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/evas/engines/gl_common/evas_gl_core.c')
-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)
2460 Eina_Bool dbg = EINA_FALSE; 2460 Eina_Bool dbg = EINA_FALSE;
2461 EVGL_Resource *rsc; 2461 EVGL_Resource *rsc;
2462 int curr_fbo = 0, curr_draw_fbo = 0, curr_read_fbo = 0; 2462 int curr_fbo = 0, curr_draw_fbo = 0, curr_read_fbo = 0;
2463 Eina_Bool ctx_changed = EINA_FALSE;
2463 2464
2464 // Check the input validity. If either sfc is valid but ctx is NULL, it's also error. 2465 // Check the input validity. If either sfc is valid but ctx is NULL, it's also error.
2465 // sfc can be NULL as evas gl supports surfaceless make current 2466 // 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)
2550 evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONTEXT); 2551 evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONTEXT);
2551 return 0; 2552 return 0;
2552 } 2553 }
2554
2555 if (rsc->current_ctx != ctx)
2556 ctx_changed = EINA_TRUE;
2557
2553 rsc->current_ctx = ctx; 2558 rsc->current_ctx = ctx;
2554 rsc->current_eng = eng_data; 2559 rsc->current_eng = eng_data;
2555 2560
@@ -2807,7 +2812,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2807 _framebuffer_create(&ctx->surface_fbo, ctx->version); 2812 _framebuffer_create(&ctx->surface_fbo, ctx->version);
2808 2813
2809 // Attach fbo and the buffers 2814 // Attach fbo and the buffers
2810 if ((rsc->current_ctx != ctx) || (ctx->current_sfc != sfc) || (rsc->direct.rendered)) 2815 if ((ctx_changed) || (ctx->current_sfc != sfc) || (rsc->direct.rendered))
2811 { 2816 {
2812 sfc->current_ctx = ctx; 2817 sfc->current_ctx = ctx;
2813 if ((sfc->direct_mem_opt) && (sfc->direct_override)) 2818 if ((sfc->direct_mem_opt) && (sfc->direct_override))