Revert "[evas_gl_thread] change mode of glTexImage2D to finish for GLES1.1" 63/128663/2
authorJoogab Yun <joogab.yun@samsung.com>
Thu, 11 May 2017 01:43:22 +0000 (10:43 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 15 May 2017 00:56:51 +0000 (00:56 +0000)
This reverts commit 76cb3476759840ce6ee91c6028e0539fb46ab0d4.

Change-Id: Iec7521cc4d65b9ae65968893bfc9034b3999ca53

src/modules/evas/engines/gl_common/evas_gl_thread_evgl_api_generated.c
src/modules/evas/engines/gl_common/evas_gl_thread_evgl_generated.c
src/modules/evas/engines/gl_common/evas_gl_thread_gl_generated.c
src/utils/evas/gl_api_def.txt

index 1830fd5..a113f96 100644 (file)
@@ -6001,6 +6001,8 @@ typedef struct
    GLenum format;
    GLenum type;
    const void* pixels;
+   int command_allocated;
+   GLTEXIMAGE2D_COPY_VARIABLE; /* TODO */
 
 } EVGL_API_Thread_Command_glTexImage2D;
 
@@ -6022,6 +6024,10 @@ _evgl_api_thread_glTexImage2D(void *data)
                               thread_data->type,
                               thread_data->pixels);
 
+   GLTEXIMAGE2D_COPY_VARIABLE_FREE; /* TODO */
+
+   if (thread_data->command_allocated)
+     eina_mempool_free(_mp_command, thread_data);
 }
 
 EAPI void
@@ -6038,6 +6044,22 @@ glTexImage2D_evgl_api_thread_cmd(GLenum target, GLint level, GLint internalforma
    EVGL_API_Thread_Command_glTexImage2D thread_data_local;
    EVGL_API_Thread_Command_glTexImage2D *thread_data = &thread_data_local;
 
+   /* command_allocated flag init. */
+   thread_data->command_allocated = 0;
+
+   if (!evas_gl_thread_force_finish())
+     { /* _flush */
+        EVGL_API_Thread_Command_glTexImage2D *thread_data_new;
+        thread_data_new = eina_mempool_malloc(_mp_command,
+                                              sizeof(EVGL_API_Thread_Command_glTexImage2D));
+        if (thread_data_new)
+          {
+             thread_data = thread_data_new;
+             thread_data->command_allocated = 1;
+             thread_mode = EVAS_GL_THREAD_MODE_FLUSH;
+          }
+     }
+
    thread_data->target = target;
    thread_data->level = level;
    thread_data->internalformat = internalformat;
@@ -6048,6 +6070,14 @@ glTexImage2D_evgl_api_thread_cmd(GLenum target, GLint level, GLint internalforma
    thread_data->type = type;
    thread_data->pixels = pixels;
 
+   GLTEXIMAGE2D_COPY_VARIABLE_INIT; /* TODO */
+
+   if (thread_mode == EVAS_GL_THREAD_MODE_FINISH)
+     goto finish;
+
+   GLTEXIMAGE2D_COPY_TO_MEMPOOL; /* TODO */
+
+finish:
    evas_gl_thread_cmd_enqueue(EVAS_GL_THREAD_TYPE_EVGL,
                               _evgl_api_thread_glTexImage2D,
                               thread_data,
index 2c11f43..c4cdeb3 100644 (file)
@@ -3911,6 +3911,8 @@ typedef struct
    GLenum format;
    GLenum type;
    const void *pixels;
+   int command_allocated;
+   GLTEXIMAGE2D_COPY_VARIABLE; /* TODO */
 
 } EVGL_Thread_Command_glTexImage2D;
 
@@ -3930,6 +3932,10 @@ _evgl_thread_glTexImage2D(void *data)
                 thread_data->type,
                 thread_data->pixels);
 
+   GLTEXIMAGE2D_COPY_VARIABLE_FREE; /* TODO */
+
+   if (thread_data->command_allocated)
+     eina_mempool_free(_mp_command, thread_data);
 }
 
 EAPI void
@@ -3946,6 +3952,22 @@ glTexImage2D_evgl_thread_cmd(GLenum target, GLint level, GLint internalformat, G
    EVGL_Thread_Command_glTexImage2D thread_data_local;
    EVGL_Thread_Command_glTexImage2D *thread_data = &thread_data_local;
 
+   /* command_allocated flag init. */
+   thread_data->command_allocated = 0;
+
+   if (!evas_gl_thread_force_finish())
+     { /* _flush */
+        EVGL_Thread_Command_glTexImage2D *thread_data_new;
+        thread_data_new = eina_mempool_malloc(_mp_command,
+                                              sizeof(EVGL_Thread_Command_glTexImage2D));
+        if (thread_data_new)
+          {
+             thread_data = thread_data_new;
+             thread_data->command_allocated = 1;
+             thread_mode = EVAS_GL_THREAD_MODE_FLUSH;
+          }
+     }
+
    thread_data->target = target;
    thread_data->level = level;
    thread_data->internalformat = internalformat;
@@ -3956,6 +3978,14 @@ glTexImage2D_evgl_thread_cmd(GLenum target, GLint level, GLint internalformat, G
    thread_data->type = type;
    thread_data->pixels = pixels;
 
+   GLTEXIMAGE2D_COPY_VARIABLE_INIT; /* TODO */
+
+   if (thread_mode == EVAS_GL_THREAD_MODE_FINISH)
+     goto finish;
+
+   GLTEXIMAGE2D_COPY_TO_MEMPOOL; /* TODO */
+
+finish:
    evas_gl_thread_cmd_enqueue(EVAS_GL_THREAD_TYPE_EVGL,
                               _evgl_thread_glTexImage2D,
                               thread_data,
index de204bc..496e54f 100644 (file)
@@ -4157,6 +4157,8 @@ typedef struct
    GLenum format;
    GLenum type;
    const void *pixels;
+   int command_allocated;
+   GLTEXIMAGE2D_COPY_VARIABLE; /* TODO */
 
 } Evas_Thread_Command_glTexImage2D;
 
@@ -4176,6 +4178,10 @@ _gl_thread_glTexImage2D(void *data)
                 thread_data->type,
                 thread_data->pixels);
 
+   GLTEXIMAGE2D_COPY_VARIABLE_FREE; /* TODO */
+
+   if (thread_data->command_allocated)
+     eina_mempool_free(_mp_command, thread_data);
 }
 
 EAPI void
@@ -4192,6 +4198,22 @@ glTexImage2D_thread_cmd(GLenum target, GLint level, GLint internalformat, GLsize
    Evas_Thread_Command_glTexImage2D thread_data_local;
    Evas_Thread_Command_glTexImage2D *thread_data = &thread_data_local;
 
+   /* command_allocated flag init. */
+   thread_data->command_allocated = 0;
+
+   if (!evas_gl_thread_force_finish())
+     { /* _flush */
+        Evas_Thread_Command_glTexImage2D *thread_data_new;
+        thread_data_new = eina_mempool_malloc(_mp_command,
+                                              sizeof(Evas_Thread_Command_glTexImage2D));
+        if (thread_data_new)
+          {
+             thread_data = thread_data_new;
+             thread_data->command_allocated = 1;
+             thread_mode = EVAS_GL_THREAD_MODE_FLUSH;
+          }
+     }
+
    thread_data->target = target;
    thread_data->level = level;
    thread_data->internalformat = internalformat;
@@ -4202,6 +4224,14 @@ glTexImage2D_thread_cmd(GLenum target, GLint level, GLint internalformat, GLsize
    thread_data->type = type;
    thread_data->pixels = pixels;
 
+   GLTEXIMAGE2D_COPY_VARIABLE_INIT; /* TODO */
+
+   if (thread_mode == EVAS_GL_THREAD_MODE_FINISH)
+     goto finish;
+
+   GLTEXIMAGE2D_COPY_TO_MEMPOOL; /* TODO */
+
+finish:
    evas_gl_thread_cmd_enqueue(EVAS_GL_THREAD_TYPE_GL,
                               _gl_thread_glTexImage2D,
                               thread_data,
index c6bbb22..d6f0548 100644 (file)
 
 
 # Texture Image Specification
-| EVAS | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | finish | noext | userDefined | |
+| EVAS | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | flush | noext | userDefined | |
 | EVAS | void | glTexSubImage2D | GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void *pixels | flush | noext |  userDefined | |
 
 # Compressed Texture Images
 
 
 # Texture Image Specification
-| EVAS GL | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | finish | noext | userDefined | |
+| EVAS GL | void | glTexImage2D | GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const void *pixels | flush | noext | userDefined | |
 | EVAS GL | void | glTexSubImage2D | GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void *pixels | flush | noext |  userDefined | |
 
 # Compressed Texture Images
 | EVAS GL API | void | glStencilMaskSeparate | GLenum face, GLuint mask | finish | noext | | |
 | EVAS GL API | void | glStencilOp | GLenum fail, GLenum zfail, GLenum zpass | finish | noext | | |
 | EVAS GL API | void | glStencilOpSeparate | GLenum face, GLenum fail, GLenum zfail, GLenum zpass | finish | noext | | |
-| EVAS GL API | void | glTexImage2D | GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels | finish | noext | userDefined | |
+| EVAS GL API | void | glTexImage2D | GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels | flush | noext | userDefined | |
 | EVAS GL API | void | glTexParameterf | GLenum target, GLenum pname, GLfloat param | flush | noext | | |
 | EVAS GL API | void | glTexParameterfv | GLenum target, GLenum pname, const GLfloat* params | flush | noext | _mp_default, sizeof(GLfloat), params | |
 | EVAS GL API | void | glTexParameteri | GLenum target, GLenum pname, GLint param | flush | noext | | |