diff options
author | jutty.lee <jutty.lee@samsung.com> | 2016-10-26 17:05:45 +0900 |
---|---|---|
committer | Haegeun Park <haegeun.park@samsung.com> | 2017-01-11 18:20:36 +0900 |
commit | 073820aa4f31d2ea2242ffccdb07cbf865a3ae1d (patch) | |
tree | 04cd9ca1de6da1fd4a00961fecc3c48e6f8b02a5 | |
parent | 898699f4e29e53ec73ce733cabcbf6584ec3e6d2 (diff) | |
download | efl-073820aa4f31d2ea2242ffccdb07cbf865a3ae1d.tar.gz |
evas/gl_generic: (GL thread) Replace GL APIs in GL-backend to threaded APIs (2/4)
-rw-r--r-- | src/modules/evas/engines/gl_generic/evas_engine.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 6673b76572..92daa03af5 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -320,7 +320,7 @@ _native_bind_cb(void *image) Evas_Native_Surface *n = im->native.data; if (n->type == EVAS_NATIVE_SURFACE_OPENGL) - glBindTexture(GL_TEXTURE_2D, n->data.opengl.texture_id); + evas_glBindTexture_th(GL_TEXTURE_2D, n->data.opengl.texture_id); } static void @@ -330,7 +330,7 @@ _native_unbind_cb(void *image) Evas_Native_Surface *n = im->native.data; if (n->type == EVAS_NATIVE_SURFACE_OPENGL) - glBindTexture(GL_TEXTURE_2D, 0); + evas_glBindTexture_th(GL_TEXTURE_2D, 0); } static void @@ -1840,20 +1840,20 @@ eng_gl_surface_read_pixels(void *data EINA_UNUSED, void *surface, * But some devices don't support GL_BGRA, so we still need to convert. */ - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &fbo); + evas_glGetIntegerv_th(GL_FRAMEBUFFER_BINDING, &fbo); if (fbo != (GLint) im->tex->pt->fb) glsym_glBindFramebuffer(GL_FRAMEBUFFER, im->tex->pt->fb); - glPixelStorei(GL_PACK_ALIGNMENT, 4); + evas_glPixelStorei_th(GL_PACK_ALIGNMENT, 4); // With GLX we will try to read BGRA even if the driver reports RGBA #if defined(GL_GLES) && defined(GL_IMPLEMENTATION_COLOR_READ_FORMAT) - glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &fmt); + evas_glGetIntegerv_th(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &fmt); #endif if ((im->tex->pt->format == GL_BGRA) && (fmt == GL_BGRA)) { - glReadPixels(x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, pixels); - done = (glGetError() == GL_NO_ERROR); + evas_glReadPixels_th(x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, pixels); + done = (evas_glGetError_th() == GL_NO_ERROR); } if (!done) @@ -1861,7 +1861,7 @@ eng_gl_surface_read_pixels(void *data EINA_UNUSED, void *surface, DATA32 *ptr = pixels; int k; - glReadPixels(x, y, w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels); + evas_glReadPixels_th(x, y, w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels); for (k = w * h; k; --k) { const DATA32 v = *ptr; |