[evas-gl] enable dynamic_hint in wayland_egl 20/83620/3
authorsunghyun kim <scholb.kim@samsung.com>
Fri, 12 Aug 2016 05:02:21 +0000 (14:02 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 12 Aug 2016 09:05:12 +0000 (02:05 -0700)
a feature called dynamic hint has been disabled in wayland.
so i enable this hint and fixed some crash.

1. Add flag in wayland_egl
: we need to check 'EGL_TIZEN_image_native_surface' in wayland
  currently only gl_x11 check it.

2. Change dyn.target GL_TEXTURE_EXTERNAL_OES to GL_TEXTURE_2D
: if this target is GL_TEXTURE_EXTERNAL_OES, TM1 only show black screen.
  i think  some driver can't use GL_TEXTURE_EXTERNAL_OES.
  upstream efl only use GL_TEXTURE_2D.

3. fixed crash in ector.
: fixed some crash when ector use dynamic hint.

Change-Id: If7f4b43d0e1634fb5ebdb9ca906c96b178ca283d

src/modules/evas/engines/gl_common/evas_gl_texture.c
src/modules/evas/engines/gl_generic/evas_engine.c
src/modules/evas/engines/wayland_egl/evas_engine.c

index c2d3d8d..7a03857 100755 (executable)
@@ -771,10 +771,7 @@ _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, i
 
    _print_tex_count();
 
-   if (gc->shared->info.sec_tbm_surface)
-     pt->dyn.target = GL_TEXTURE_EXTERNAL_OES;
-   else
-     pt->dyn.target = GL_TEXTURE_2D;
+   pt->dyn.target = GL_TEXTURE_2D;
 
    glGenTextures(1, &(pt->texture));
    glBindTexture(pt->dyn.target, pt->texture);
index b240e26..d7a845c 100644 (file)
@@ -2503,9 +2503,10 @@ eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, Ector_Surface
 {
    int w, h, stride;
    Evas_GL_Image *glim = surface;
-   RGBA_Image *dst = glim->im;
+   DATA32 *pixels;
+   int load_err;
 
-   void *pixels = evas_cache_image_pixels(&dst->cache_entry);
+   glim = eng_image_data_get(data, glim, EINA_TRUE, &pixels, &load_err,NULL);
    eng_image_stride_get(data, glim, &stride);
    eng_image_size_get(data, glim, &w, &h);
    memset(pixels, 0, stride * h);
index 943189a..62502a5 100755 (executable)
@@ -252,6 +252,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
      {