summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongyeon Kim <dy5.kim@samsung.com>2015-11-11 17:06:44 +0900
committerDongyeon Kim <dy5.kim@samsung.com>2015-11-12 08:56:29 +0900
commit74e556febc1324a2b36531a1478481e44c594298 (patch)
treeed431294ff0c7bf15d2a128033c04a0de3069213
parent3d97c4c5a8789f1cf9bc338f09d4412bde28676f (diff)
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.
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h1
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c4
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c4
3 files changed, 7 insertions, 2 deletions
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 845aa3f5e1..5fd8775093 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -124,6 +124,7 @@ struct _Evas_GL_Shared
124 Eina_Bool tex_rect : 1; 124 Eina_Bool tex_rect : 1;
125 Eina_Bool sec_image_map : 1; 125 Eina_Bool sec_image_map : 1;
126 Eina_Bool sec_tbm_surface : 1; 126 Eina_Bool sec_tbm_surface : 1;
127 Eina_Bool egl_tbm_ext : 1;
127 Eina_Bool bin_program : 1; 128 Eina_Bool bin_program : 1;
128 Eina_Bool unpack_row_length : 1; 129 Eina_Bool unpack_row_length : 1;
129 Eina_Bool etc1 : 1; 130 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 2d8d936e2a..664b4e4764 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)
603 if (im->content_hint == hint) return; 603 if (im->content_hint == hint) return;
604 im->content_hint = hint; 604 im->content_hint = hint;
605 if (!im->gc) return; 605 if (!im->gc) return;
606 if ((!im->gc->shared->info.sec_image_map)
607 && (!im->gc->shared->info.sec_tbm_surface)) return;
608 if (!im->gc->shared->info.bgra) return; 606 if (!im->gc->shared->info.bgra) return;
609 // does not handle yuv yet. 607 // does not handle yuv yet.
610 // TODO: Check this list of cspaces 608 // TODO: Check this list of cspaces
@@ -622,6 +620,8 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
622 } 620 }
623 if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC) 621 if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC)
624 { 622 {
623 if ((!im->gc->shared->info.sec_image_map) &&
624 ((!im->gc->shared->info.sec_tbm_surface) || (!im->gc->shared->info.egl_tbm_ext))) return;
625 if (im->cs.data) 625 if (im->cs.data)
626 { 626 {
627 if (!im->cs.no_free) free(im->cs.data); 627 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
index 0d12b744cd..c601a0d73e 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1453,6 +1453,10 @@ gl_extn_veto(Render_Engine *re)
1453 { 1453 {
1454 glsym_eglSwapBuffersWithDamage = NULL; 1454 glsym_eglSwapBuffersWithDamage = NULL;
1455 } 1455 }
1456 if (strstr(str, "EGL_TIZEN_image_native_surface"))
1457 {
1458 eng_get_ob(re)->gl_context->shared->info.egl_tbm_ext = 1;
1459 }
1456 } 1460 }
1457 else 1461 else
1458 { 1462 {