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')
-rwxr-xr-xsrc/modules/evas/engines/gl_common/evas_gl_core.c10
1 files changed, 4 insertions, 6 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 53289e6d06..862203f755 100755
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
@@ -950,11 +950,10 @@ _internal_config_set(EVGL_Engine *ee, EVGL_Surface *sfc, Evas_GL_Config *cfg)
950} 950}
951 951
952static int 952static int
953_evgl_direct_renderable(EVGL_Engine *ee, EVGL_Resource *rsc, EVGL_Context *ctx, EVGL_Surface *sfc) 953_evgl_direct_renderable(EVGL_Engine *ee, EVGL_Resource *rsc, EVGL_Surface *sfc)
954{ 954{
955 if (ee->force_direct_off) return 0; 955 if (ee->force_direct_off) return 0;
956 if (rsc->id != ee->main_tid) return 0; 956 if (rsc->id != ee->main_tid) return 0;
957 if (!ctx) return 0;
958 if (!sfc->direct_fb_opt) return 0; 957 if (!sfc->direct_fb_opt) return 0;
959 if (!rsc->direct_img_obj) return 0; 958 if (!rsc->direct_img_obj) return 0;
960 959
@@ -1026,14 +1025,13 @@ int
1026_evgl_direct_enabled(EVGL_Engine *ee) 1025_evgl_direct_enabled(EVGL_Engine *ee)
1027{ 1026{
1028 EVGL_Resource *rsc; 1027 EVGL_Resource *rsc;
1029 EVGL_Context *ctx;
1030 EVGL_Surface *sfc; 1028 EVGL_Surface *sfc;
1031 1029
1032 if (!(rsc=_evgl_tls_resource_get(ee))) return 0; 1030 if (!(rsc=_evgl_tls_resource_get(ee))) return 0;
1033 if (!(ctx=rsc->current_ctx)) return 0; 1031 if (!(rsc->current_ctx)) return 0;
1034 if (!(sfc=rsc->current_ctx->current_sfc)) return 0; 1032 if (!(sfc=rsc->current_ctx->current_sfc)) return 0;
1035 1033
1036 return _evgl_direct_renderable(ee, rsc, ctx, sfc); 1034 return _evgl_direct_renderable(ee, rsc, sfc);
1037} 1035}
1038 1036
1039//---------------------------------------------------------------// 1037//---------------------------------------------------------------//
@@ -1450,7 +1448,7 @@ evgl_make_current(EVGL_Engine *ee, EVGL_Surface *sfc, EVGL_Context *ctx)
1450 glGenFramebuffers(1, &ctx->surface_fbo); 1448 glGenFramebuffers(1, &ctx->surface_fbo);
1451 1449
1452 // Direct Rendering 1450 // Direct Rendering
1453 if (_evgl_direct_renderable(ee, rsc, ctx, sfc)) 1451 if (_evgl_direct_renderable(ee, rsc, sfc))
1454 { 1452 {
1455 // This is to transition from FBO rendering to direct rendering 1453 // This is to transition from FBO rendering to direct rendering
1456 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &curr_fbo); 1454 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &curr_fbo);