[evas-gl] change dyn.target & delete api 99/81599/2
authorsunghyun kim <scholb.kim@samsung.com>
Wed, 27 Jul 2016 07:58:30 +0000 (16:58 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 2 Aug 2016 01:18:07 +0000 (18:18 -0700)
1. dyn.target need to change GL_TEXTURE_2D. if this value set GL_TEXTURE_EXTERNAL_OES, it has some issue.
2. we don't need evas_gl_common_texture_shared_specific & evas_gl_common_texture_shared_back.
   because these api for dyn.img change case.

Change-Id: Ieec1edc9a454278f001bd18c1f5cbf0c490e0c71

src/modules/evas/engines/gl_common/evas_gl_common.h
src/modules/evas/engines/gl_common/evas_gl_context.c
src/modules/evas/engines/gl_common/evas_gl_texture.c

index 9461b8f..922a899 100755 (executable)
@@ -687,9 +687,6 @@ Evas_GL_Polygon  *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, in
 Evas_GL_Polygon  *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
 void              evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y);
 
-void              evas_gl_common_texture_shared_specific(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt, int i);
-void              evas_gl_common_texture_shared_back(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt);
-
 void              evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2);
 
 extern void       (*glsym_glGenFramebuffers)      (GLsizei a, GLuint *b);
index 1e8c4a1..41cd657 100644 (file)
@@ -1151,7 +1151,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
      glUseProgram(gc->state.current.prog->prog);
 
    glActiveTexture(GL_TEXTURE0);
-   evas_gl_common_texture_shared_back(gc, NULL);
+   glBindTexture(gc->pipe[0].shader.tex_target, gc->pipe[0].shader.cur_tex);
 
    _evas_gl_common_viewport_set(gc,1);
 }
@@ -3176,7 +3176,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
                }
 #endif
              glActiveTexture(GL_TEXTURE0);
-             evas_gl_common_texture_shared_specific(gc, NULL, i);
+             glBindTexture(gc->pipe[i].shader.tex_target, gc->pipe[i].shader.cur_tex);
           }
         if (gc->pipe[i].array.im)
           {
index bb84d3e..83dce61 100755 (executable)
@@ -161,31 +161,6 @@ _evas_gl_texture_search_format(Eina_Bool alpha, Eina_Bool bgra, Evas_Colorspace
    return -1;
 }
 
-void
-evas_gl_common_texture_shared_specific(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt, int i)
-{
-   if (!pt || pt->texture != gc->pipe[i].shader.cur_tex)
-     {
-        if (gc->pipe[i].array.im)
-          {
-             if (gc->pipe[i].array.im->tex->pt->dyn.img)
-               gc->pipe[i].shader.tex_target = gc->pipe[i].array.im->tex->pt->dyn.target;
-             else
-               gc->pipe[i].shader.tex_target = gc->pipe[i].array.im->native.target;
-          }
-        else
-          gc->pipe[i].shader.tex_target = GL_TEXTURE_2D;
-
-        glBindTexture(gc->pipe[i].shader.tex_target, gc->pipe[i].shader.cur_tex);
-     }
-}
-
-void
-evas_gl_common_texture_shared_back(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt)
-{
-   evas_gl_common_texture_shared_specific(gc, pt, 0);
-}
-
 static void
 _print_tex_count(void)
 {
@@ -771,10 +746,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);