From b82a8633c1e3ecde30b6e24bbd2de2e0f2a29ca4 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Wed, 6 Sep 2017 13:47:58 +0900 Subject: [PATCH] evas_gl_thread_glx: Fix build error with GL COCOA Change-Id: Ia045e080cfa581670d7b8653ad93cc2c4eeeaeb0 --- src/modules/evas/engines/gl_common/evas_gl_core.c | 2 ++ src/modules/evas/engines/gl_common/evas_gl_thread.c | 8 ++++++-- src/modules/evas/engines/gl_common/evas_gl_thread_glx.c | 4 ++++ src/modules/evas/engines/gl_common/evas_gl_thread_glx.h | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) 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 abcd07f..6068d32 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -2167,6 +2167,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h) { if (evas_gl_thread_enabled(EVAS_GL_THREAD_TYPE_GL)) { +#ifndef BUILD_ENGINE_GL_COCOA // Now surface direct override is ON. // It means that EvasGL DIRECT rendering is enabled strictly // and Evas GL THREAD rendering needs disabled from now, @@ -2183,6 +2184,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h) ERR("Evas GL thread fallback is failed"); evas_gl_thread_disabled(); +#endif /* ! BUILD_ENGINE_GL_COCOA */ } } diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread.c b/src/modules/evas/engines/gl_common/evas_gl_thread.c index d3d7026..a436340 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread.c +++ b/src/modules/evas/engines/gl_common/evas_gl_thread.c @@ -90,8 +90,10 @@ evas_gl_thread_func_get(void) #ifdef GL_GLES THREAD_FUNCTION_ASSIGN(evas_gl_thread_egl_func_get); #else + #ifndef BUILD_ENGINE_GL_COCOA THREAD_FUNCTION_ASSIGN(evas_gl_thread_glx_func_get); -#endif + #endif /* ! BUILD_ENGINE_GL_COCOA */ +#endif /* GL_GLES */ THREAD_FUNCTION_ASSIGN(evas_gl_thread_gl_func_get); @@ -205,11 +207,13 @@ evas_gl_thread_link_init(void) else ERR("Thread functions (EGL) are not exist"); #else + #ifndef BUILD_ENGINE_GL_COCOA if (th_func->evas_gl_thread_glx_func_get) _glx_thread_link_init(th_func->evas_gl_thread_glx_func_get()); else ERR("Thread functions (GLX) are not exist"); -#endif + #endif /* ! BUILD_ENGINE_GL_COCOA */ +#endif /* GL_GLES */ if (th_func->evas_gl_thread_gl_func_get) _gl_thread_link_init(th_func->evas_gl_thread_gl_func_get()); diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_glx.c b/src/modules/evas/engines/gl_common/evas_gl_thread_glx.c index 0e28942..fbd27ac 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_glx.c +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_glx.c @@ -3,6 +3,8 @@ #ifndef GL_GLES +#ifndef BUILD_ENGINE_GL_COCOA + #define EVAS_TH_GLX_FN(ret, name, ...) \ ret (*GL_TH_FN(name))(GL_TH_DP, ##__VA_ARGS__); #define EVAS_TH_GLX_FN_ASYNC(ret, name, ...) \ @@ -1615,4 +1617,6 @@ _glx_thread_link_init(void *func_ptr) #endif /* EVAS_GL_RENDER_THREAD_COMPILE_FOR_GL_GENERIC */ +#endif /* ! BUILD_ENGINE_GL_COCOA */ + #endif /* ! GL_GLES */ diff --git a/src/modules/evas/engines/gl_common/evas_gl_thread_glx.h b/src/modules/evas/engines/gl_common/evas_gl_thread_glx.h index ee2325b..04dfc97 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_thread_glx.h +++ b/src/modules/evas/engines/gl_common/evas_gl_thread_glx.h @@ -3,6 +3,8 @@ #ifndef GL_GLES +#ifndef BUILD_ENGINE_GL_COCOA + #include extern void *evas_gl_thread_glx_func_get(void); @@ -75,6 +77,8 @@ extern void _glx_thread_link_init(void *func_ptr); #endif /* EVAS_GL_RENDER_THREAD_COMPILE_FOR_GL_GENERIC */ +#endif /* ! BUILD_ENGINE_GL_COCOA */ + #endif /* ! GL_GLES */ #endif /* EVAS_GL_THREAD_GLX_H */ -- 2.7.4