From 221d5bf5dd3bbef89b8042938fa0de0f29b3b615 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Fri, 6 Jan 2017 17:09:19 +0900 Subject: [PATCH] [evas_gl] Evas GL Render Threading Patch - 3 -- fixed mistake Change-Id: I4cb665428b44017003710e6a035625eb62bfad46 --- src/lib/evas/common/evas_thread_render.c | 15 +++++++-------- src/modules/evas/engines/gl_common/evas_gl_core.c | 4 ++-- src/modules/evas/engines/gl_common/evas_gl_shader.c | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/lib/evas/common/evas_thread_render.c b/src/lib/evas/common/evas_thread_render.c index 5137454..a1e8841 100644 --- a/src/lib/evas/common/evas_thread_render.c +++ b/src/lib/evas/common/evas_thread_render.c @@ -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: diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c index 345751e..42ba2df 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -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); diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c index 05fe515..1b102ab 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_shader.c +++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c @@ -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); } } -- 2.7.4