From ce537f9f22a057a22304212a1a01a45547f3ef2b Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Mon, 24 Jul 2017 19:28:28 +0900 Subject: [PATCH] [evas] remove build warning message Change-Id: I12f654e82620f2a44fba4cc0e7aa841e054fca8d --- .../engines/wayland/ecore_evas_wayland_shm.c | 6 +---- src/modules/evas/engines/gl_common/evas_gl_api.c | 28 ++++++++++++++-------- .../evas/engines/gl_common/evas_gl_api_gles3_def.h | 2 +- .../evas/engines/gl_common/evas_gl_thread_egl.c | 4 ++-- .../evas/engines/gl_common/evas_gl_thread_egl.h | 4 ++-- .../evas/engines/gl_common/evas_gl_thread_gl.h | 3 +++ src/modules/evas/engines/wayland_shm/evas_tbmbuf.c | 4 ++-- src/utils/evas/gl_api_def.txt | 2 +- 8 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index 386d213..1a4e962 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c @@ -40,7 +40,6 @@ static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha); static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent); static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize); static struct wayland_tbm_client *tbm_client; -static void *tbm_queue; static Ecore_Evas_Engine_Func _ecore_wl_engine_func = { @@ -129,7 +128,6 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent, Ecore_Evas_Engine_Wl_Data *wdata; Ecore_Evas_Interface_Wayland *iface; Ecore_Evas *ee; - int _ecore_evas_wl_init_count = -1; int method = 0; int fx = 0, fy = 0, fw = 0, fh = 0; @@ -167,7 +165,7 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent, ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); - _ecore_evas_wl_init_count = _ecore_evas_wl_common_init(); + _ecore_evas_wl_common_init(); ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_wl_engine_func; ee->engine.data = wdata; @@ -334,8 +332,6 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent, static void _ecore_evas_wl_free(Ecore_Evas *ee) { - Evas_Engine_Info_Wayland_Shm *einfo; - LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c b/src/modules/evas/engines/gl_common/evas_gl_api.c index 956d164..4a927c7 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_api.c +++ b/src/modules/evas/engines/gl_common/evas_gl_api.c @@ -762,6 +762,8 @@ _evgl_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) EVGL_Resource *rsc; EVGL_Context *ctx; + EINA_SAFETY_ON_NULL_RETURN(_gles3_api.glFramebufferParameteri); + if (!(rsc=_evgl_tls_resource_get())) { ERR("Unable to execute GL command. Error retrieving tls"); @@ -801,7 +803,7 @@ _evgl_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) } } - glFramebufferParameteri(target, pname, param); + _gles3_api.glFramebufferParameteri(target, pname, param); } #endif @@ -861,7 +863,7 @@ _evgl_glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLi } } - glFramebufferTexture(target, attachment, texture, level); + _gles3_api.glFramebufferTexture(target, attachment, texture, level); } @@ -1190,6 +1192,8 @@ _evgl_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params) EVGL_Resource *rsc; EVGL_Context *ctx; + EINA_SAFETY_ON_NULL_RETURN(_gles3_api.glGetFramebufferParameteriv); + if (!(rsc=_evgl_tls_resource_get())) { ERR("Unable to execute GL command. Error retrieving tls"); @@ -1229,7 +1233,7 @@ _evgl_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params) } } - glGetFramebufferParameteriv(target, pname, params); + _gles3_api.glGetFramebufferParameteriv(target, pname, params); } #endif void @@ -1775,6 +1779,8 @@ _evgl_glDrawBuffers(GLsizei n, const GLenum *bufs) Eina_Bool target_is_fbo = EINA_FALSE; unsigned int drawbuffer; + if (!_gles3_api.glDrawBuffers) return; + ctx = evas_gl_common_current_context_get(); if (!ctx) { @@ -1784,7 +1790,7 @@ _evgl_glDrawBuffers(GLsizei n, const GLenum *bufs) if (!bufs) { - glDrawBuffers(n, bufs); + _gles3_api.glDrawBuffers(n, bufs); return; } @@ -1801,7 +1807,7 @@ _evgl_glDrawBuffers(GLsizei n, const GLenum *bufs) if (*bufs == GL_BACK) { drawbuffer = GL_COLOR_ATTACHMENT0; - glDrawBuffers(n, &drawbuffer); + _gles3_api.glDrawBuffers(n, &drawbuffer); } else if ((*bufs & GL_COLOR_ATTACHMENT0) == GL_COLOR_ATTACHMENT0) { @@ -1809,7 +1815,7 @@ _evgl_glDrawBuffers(GLsizei n, const GLenum *bufs) } else { - glDrawBuffers(n, bufs); + _gles3_api.glDrawBuffers(n, bufs); } } else @@ -1819,7 +1825,7 @@ _evgl_glDrawBuffers(GLsizei n, const GLenum *bufs) } else { - glDrawBuffers(n, bufs); + _gles3_api.glDrawBuffers(n, bufs); } } @@ -1829,6 +1835,8 @@ _evgl_glReadBuffer(GLenum src) EVGL_Context *ctx; Eina_Bool target_is_fbo = EINA_FALSE; + if (!_gles3_api.glReadBuffer) return; + ctx = evas_gl_common_current_context_get(); if (!ctx) { @@ -1846,7 +1854,7 @@ _evgl_glReadBuffer(GLenum src) { if (src == GL_BACK) { - glReadBuffer(GL_COLOR_ATTACHMENT0); + _gles3_api.glReadBuffer(GL_COLOR_ATTACHMENT0); } else if((src & GL_COLOR_ATTACHMENT0) == GL_COLOR_ATTACHMENT0) { @@ -1854,12 +1862,12 @@ _evgl_glReadBuffer(GLenum src) } else { - glReadBuffer(src); + _gles3_api.glReadBuffer(src); } } else { - glReadBuffer(src); + _gles3_api.glReadBuffer(src); } } diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h b/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h index 06a3f49..9789544 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h +++ b/src/modules/evas/engines/gl_common/evas_gl_api_gles3_def.h @@ -119,7 +119,7 @@ _EVASGL_FUNCTION_BEGIN_VOID( glGetProgramInterfaceiv, (GLuint program, GLenum pr _EVASGL_FUNCTION_BEGIN(GLuint, glGetProgramResourceIndex, (GLuint program, GLenum programInterface, const GLchar *name), (program, programInterface, name)) _EVASGL_FUNCTION_BEGIN_VOID( glGetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name), (program, programInterface, index, bufSize, length, name)) _EVASGL_FUNCTION_BEGIN_VOID( glGetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params), (program, programInterface, index, propCount, props, bufSize, length, params)) -_EVASGL_FUNCTION_BEGIN(GLuint, glGetProgramResourceLocation, (GLuint program, GLenum programInterface, const GLchar *name), (program, programInterface, name)) +_EVASGL_FUNCTION_BEGIN(GLint, glGetProgramResourceLocation, (GLuint program, GLenum programInterface, const GLchar *name), (program, programInterface, name)) _EVASGL_FUNCTION_BEGIN_VOID( glUseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program), (pipeline, stages, program)) _EVASGL_FUNCTION_BEGIN_VOID( glActiveShaderProgram, (GLuint pipeline, GLuint program), (pipeline, program)) _EVASGL_FUNCTION_BEGIN(GLuint, glCreateShaderProgramv, (GLenum type, GLsizei count, const GLchar *const*strings), (type, count, strings)) diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_egl.c b/src/modules/evas/engines/gl_common/evas_gl_thread_egl.c index 21125b2..1516d69 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_egl.c +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_egl.c @@ -813,7 +813,7 @@ _evgl_thread_eglDestroySurface(void *data) thread_data->egl_surf); } -EAPI EGLSurface +EAPI EGLBoolean eglDestroySurface_evgl_thread_cmd(EGLDisplay egl_disp, EGLSurface egl_surf) { if (!evas_evgl_thread_enabled()) @@ -993,7 +993,7 @@ EGLContext (*eglGetCurrentContext_evgl_thread_cmd)(void); EGLSurface (*eglGetCurrentSurface_evgl_thread_cmd)(EGLint readdraw); EGLDisplay (*eglGetCurrentDisplay_evgl_thread_cmd)(void); EGLSurface (*eglCreateWindowSurface_evgl_thread_cmd)(EGLDisplay egl_disp, EGLConfig egl_config, EGLNativeWindowType egl_win, EGLint const * attrib_list); -EGLSurface (*eglDestroySurface_evgl_thread_cmd)(EGLDisplay egl_disp, EGLSurface egl_surf); +EGLBoolean (*eglDestroySurface_evgl_thread_cmd)(EGLDisplay egl_disp, EGLSurface egl_surf); EGLContext (*eglCreateContext_evgl_thread_cmd)(EGLDisplay display, EGLConfig config, EGLContext share_context, EGLint const * attrib_list); EGLBoolean (*eglDestroyContext_evgl_thread_cmd)(EGLDisplay display, EGLContext context); char const *(*eglQueryString_evgl_thread_cmd)(EGLDisplay display, EGLint name); diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_egl.h b/src/modules/evas/engines/gl_common/evas_gl_thread_egl.h index e70dba8..9b21044 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_egl.h +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_egl.h @@ -76,7 +76,7 @@ EAPI EGLContext eglGetCurrentContext_evgl_thread_cmd(void); EAPI EGLSurface eglGetCurrentSurface_evgl_thread_cmd(EGLint readdraw); EAPI EGLDisplay eglGetCurrentDisplay_evgl_thread_cmd(void); EAPI EGLSurface eglCreateWindowSurface_evgl_thread_cmd(EGLDisplay egl_disp, EGLConfig egl_config, EGLNativeWindowType egl_win, EGLint const * attrib_list); -EAPI EGLSurface eglDestroySurface_evgl_thread_cmd(EGLDisplay egl_disp, EGLSurface egl_surf); +EAPI EGLBoolean eglDestroySurface_evgl_thread_cmd(EGLDisplay egl_disp, EGLSurface egl_surf); EAPI EGLContext eglCreateContext_evgl_thread_cmd(EGLDisplay display, EGLConfig config, EGLContext share_context, EGLint const * attrib_list); EAPI EGLBoolean eglDestroyContext_evgl_thread_cmd(EGLDisplay display, EGLContext context); EAPI char const *eglQueryString_evgl_thread_cmd(EGLDisplay display, EGLint name); @@ -124,7 +124,7 @@ extern EGLContext (*eglGetCurrentContext_evgl_thread_cmd)(void); extern EGLSurface (*eglGetCurrentSurface_evgl_thread_cmd)(EGLint readdraw); extern EGLDisplay (*eglGetCurrentDisplay_evgl_thread_cmd)(void); extern EGLSurface (*eglCreateWindowSurface_evgl_thread_cmd)(EGLDisplay egl_disp, EGLConfig egl_config, EGLNativeWindowType egl_win, EGLint const * attrib_list); -extern EGLSurface (*eglDestroySurface_evgl_thread_cmd)(EGLDisplay egl_disp, EGLSurface egl_surf); +extern EGLBoolean (*eglDestroySurface_evgl_thread_cmd)(EGLDisplay egl_disp, EGLSurface egl_surf); extern EGLContext (*eglCreateContext_evgl_thread_cmd)(EGLDisplay display, EGLConfig config, EGLContext share_context, EGLint const * attrib_list); extern EGLBoolean (*eglDestroyContext_evgl_thread_cmd)(EGLDisplay display, EGLContext context); extern char const *(*eglQueryString_evgl_thread_cmd)(EGLDisplay display, EGLint name); diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_gl.h b/src/modules/evas/engines/gl_common/evas_gl_thread_gl.h index 221d3f5..242570c 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_gl.h +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_gl.h @@ -40,6 +40,8 @@ typedef uint64_t EvasGLuint64; # include "evas_gl_thread_evgl_api_generated.h" EAPI void +glTexImage2DEVAS_evgl_thread_cmd(int finish_mode, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +EAPI void glTexSubImage2DEVAS_thread_cmd(int thread_push, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); #else /* ! EVAS_GL_RENDER_THREAD_COMPILE_FOR_GL_GENERIC */ @@ -48,6 +50,7 @@ glTexSubImage2DEVAS_thread_cmd(int thread_push, GLenum target, GLint level, GLin # include "evas_gl_thread_gl_link_generated.h" # include "evas_gl_thread_evgl_link_generated.h" +extern void (*glTexImage2DEVAS_evgl_thread_cmd)(int finish_mode, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); extern void (*glTexSubImage2DEVAS_thread_cmd)(int thread_push, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); extern void _gl_thread_link_init(); diff --git a/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c b/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c index 9ab79c3..8e814e5 100644 --- a/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c @@ -412,7 +412,7 @@ _evas_tbmbuf_surface_assign(Surface *s) } //reset - if (num_surface != tbuf_info->num_surface) + if ((unsigned int)num_surface != tbuf_info->num_surface) { s->frame_age = 0; @@ -432,7 +432,7 @@ _evas_tbmbuf_surface_assign(Surface *s) { unsigned int diff; diff = s->frame_age - tbuf_info->age + 1; - if (diff > num_surface) return MODE_FULL; + if (diff > (unsigned int)num_surface) return MODE_FULL; switch(diff) { case 1: diff --git a/src/utils/evas/gl_api_def.txt b/src/utils/evas/gl_api_def.txt index 0e67d88..8a81cc4 100644 --- a/src/utils/evas/gl_api_def.txt +++ b/src/utils/evas/gl_api_def.txt @@ -980,7 +980,7 @@ | EVAS GL API | GLuint | glGetProgramResourceIndex | GLuint program, GLenum programInterface, const GLchar *name | finish | noext | | | | EVAS GL API | void | glGetProgramResourceName | GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name | finish | noext | | | | EVAS GL API | void | glGetProgramResourceiv | GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params | finish | noext | | | -| EVAS GL API | GLint |glGetProgramResourceLocation | GLuint program, GLenum programInterface, const GLchar *name | finish | noext | | | +| EVAS GL API | GLint | glGetProgramResourceLocation | GLuint program, GLenum programInterface, const GLchar *name | finish | noext | | | | EVAS GL API | void | glUseProgramStages | GLuint pipeline, GLbitfield stages, GLuint program | finish | noext | | | | EVAS GL API | void | glActiveShaderProgram | GLuint pipeline, GLuint program | finish | noext | | | | EVAS GL API | GLuint | glCreateShaderProgramv | GLenum type, GLsizei count, const GLchar *const*strings | finish | noext | | | -- 2.7.4