evas/gl_common: Enable dynamic hint set using tbm surface only when egl extension...
authorDongyeon Kim <dy5.kim@samsung.com>
Wed, 11 Nov 2015 08:06:44 +0000 (17:06 +0900)
committerDongyeon Kim <dy5.kim@samsung.com>
Wed, 11 Nov 2015 23:56:29 +0000 (08:56 +0900)
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.

src/modules/evas/engines/gl_common/evas_gl_common.h
src/modules/evas/engines/gl_common/evas_gl_image.c
src/modules/evas/engines/gl_x11/evas_engine.c

index 845aa3f..5fd8775 100644 (file)
@@ -124,6 +124,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;
index 2d8d936..664b4e4 100644 (file)
@@ -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);
index 0d12b74..c601a0d 100644 (file)
@@ -1453,6 +1453,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
      {