From 215695a95cb18159b4338c16c1f7c1efb29f0688 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Fri, 20 Nov 2015 14:48:56 +0900 Subject: [PATCH] evas/gl_common: Enable dynamic hint set using tbm surface only when egl extension is supported Summary: Dynamic hint set using tbm surface can only be used when EGL_TIZEN_image_native_surface extension is supported by the driver. So check for both tbm surface and egl extension. From 74e556febc1324a2b36531a1478481e44c594298 Mon Sep 17 00:00:00 2001 From: Dongyeon Kim Change-Id: I1cbbfe2911574d989854d6e077a8caed8bbf7000 --- src/modules/evas/engines/gl_common/evas_gl_common.h | 1 + src/modules/evas/engines/gl_common/evas_gl_image.c | 4 ++-- src/modules/evas/engines/gl_x11/evas_engine.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) mode change 100755 => 100644 src/modules/evas/engines/gl_x11/evas_engine.c diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index 87f74b9..eb5e44c 100755 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -123,6 +123,7 @@ struct _Evas_GL_Shared Eina_Bool tex_rect : 1; Eina_Bool sec_image_map : 1; Eina_Bool sec_tbm_surface : 1; + Eina_Bool egl_tbm_ext : 1; Eina_Bool bin_program : 1; Eina_Bool unpack_row_length : 1; Eina_Bool etc1 : 1; diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c index 2d8d936..664b4e4 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -603,8 +603,6 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) if (im->content_hint == hint) return; im->content_hint = hint; if (!im->gc) return; - if ((!im->gc->shared->info.sec_image_map) - && (!im->gc->shared->info.sec_tbm_surface)) return; if (!im->gc->shared->info.bgra) return; // does not handle yuv yet. // TODO: Check this list of cspaces @@ -622,6 +620,8 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) } if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC) { + if ((!im->gc->shared->info.sec_image_map) && + ((!im->gc->shared->info.sec_tbm_surface) || (!im->gc->shared->info.egl_tbm_ext))) return; if (im->cs.data) { if (!im->cs.no_free) free(im->cs.data); diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c old mode 100755 new mode 100644 index 7713c21..51a3caa --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -1399,6 +1399,10 @@ gl_extn_veto(Render_Engine *re) { glsym_eglSwapBuffersWithDamage = NULL; } + if (strstr(str, "EGL_TIZEN_image_native_surface")) + { + eng_get_ob(re)->gl_context->shared->info.egl_tbm_ext = 1; + } } else { -- 2.7.4