[evas_gl] Evas GL Render Threading Patch - 3 34/108934/1 accepted/tizen/common/20170110.154928 accepted/tizen/ivi/20170110.080958 accepted/tizen/mobile/20170110.080835 accepted/tizen/tv/20170110.080907 accepted/tizen/wearable/20170110.080933 submit/tizen/20170110.035404
authorJoogab Yun <joogab.yun@samsung.com>
Fri, 6 Jan 2017 08:09:19 +0000 (17:09 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Fri, 6 Jan 2017 08:09:19 +0000 (17:09 +0900)
          -- fixed mistake

Change-Id: I4cb665428b44017003710e6a035625eb62bfad46

src/lib/evas/common/evas_thread_render.c
src/modules/evas/engines/gl_common/evas_gl_core.c
src/modules/evas/engines/gl_common/evas_gl_shader.c

index 5137454d8a5e8a719ada6828f784daefb75fedda..a1e884152e250a0679b0ac56eb37800030c3e52d 100644 (file)
@@ -228,16 +228,16 @@ evas_thread_init(Evas_Thread *ev_thread, char *thread_name)
          CRI("Could not create draw thread queue lock");
          goto fail_on_lock_creation;
       }
-   if (!eina_spinlock_new(&ev_thread->finish_spinlock))
-      {
-         CRI("Could not create draw thread finish lock");
-         goto fail_on_spin_lock_creation;
-      }
    if (!eina_condition_new(&ev_thread->queue_condition, &ev_thread->queue_lock))
       {
          CRI("Could not create draw thread queue condition");
          goto fail_on_cond_creation;
       }
+   if (!eina_spinlock_new(&ev_thread->finish_spinlock))
+      {
+         CRI("Could not create draw thread finish lock");
+         goto fail_on_spin_lock_creation;
+      }
    if (!eina_thread_create(&ev_thread->worker, EINA_THREAD_NORMAL, 0,
                            evas_thread_worker_func, ev_thread))
       {
@@ -247,12 +247,11 @@ evas_thread_init(Evas_Thread *ev_thread, char *thread_name)
    return 1;
 fail_on_thread_creation:
    ev_thread->worker = 0;
-   eina_spinlock_free(&ev_thread->finish_spinlock);
    eina_condition_free(&ev_thread->queue_condition);
-fail_on_cond_creation:
-   eina_lock_free(&ev_thread->queue_lock);
 fail_on_spin_lock_creation:
    eina_spinlock_free(&ev_thread->finish_spinlock);
+fail_on_cond_creation:
+   eina_lock_free(&ev_thread->queue_lock);
 fail_on_lock_creation:
    eina_threads_shutdown();
 fail_on_eina_thread_init:
index 345751e5a79257f182de3cfefaa1c4c09ca0121d..42ba2df4e26ff1b4b8f3ef33ac4aa642c549fbd2 100644 (file)
@@ -265,9 +265,9 @@ static void
 _texture_destroy(GLuint *tex)
 {
    GLint curr_tex = 0;
-   glGetIntegerv(GL_TEXTURE_BINDING_2D, &curr_tex);
+   glGetIntegerv_evgl_thread_cmd(GL_TEXTURE_BINDING_2D, &curr_tex);
 
-   if ((GLuint)curr_tex == *tex) glBindTexture(GL_TEXTURE_2D, 0);
+   if ((GLuint)curr_tex == *tex) glBindTexture_evgl_thread_cmd(GL_TEXTURE_2D, 0);
    if (*tex)
      {
         glDeleteTextures_evgl_thread_cmd(1, tex);
index 05fe515c5338b6460c3afbb32e920125165ca4d9..1b102ab01fd834034ff9bfd62f558907465691d2 100644 (file)
@@ -897,7 +897,7 @@ evas_gl_common_shader_textures_bind(Evas_GL_Program *p)
                }
              glUniform1i_thread_cmd(loc, p->tex_count++);
           }
-        glUseProgram(curr_prog);
+        glUseProgram_thread_cmd(curr_prog);
      }
 }