summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-03-08 14:22:50 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-03-08 14:33:05 -0600
commitcdc33f5874b2c94f87b0321828e2bdb844c11021 (patch)
tree766184d7557e2a422dff02984399aa0b45c3d342 /src/modules/evas/engines
parent05d7c1c9a2e793b1051eb889e0c5173512338bb1 (diff)
gl_drm: Use gl extension string helper instead of strstr
Diffstat (limited to 'src/modules/evas/engines')
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.c15
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.h1
-rw-r--r--src/modules/evas/engines/gl_drm/evas_outbuf.c2
3 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c
index 0861d47d16..ed6a8e7b89 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -58,6 +58,7 @@ Evas_GL_Preload glsym_evas_gl_preload_shutdown = NULL;
58EVGL_Engine_Call glsym_evgl_engine_shutdown = NULL; 58EVGL_Engine_Call glsym_evgl_engine_shutdown = NULL;
59EVGL_Current_Native_Context_Get_Call glsym_evgl_current_native_context_get = NULL; 59EVGL_Current_Native_Context_Get_Call glsym_evgl_current_native_context_get = NULL;
60Evas_Gl_Symbols glsym_evas_gl_symbols = NULL; 60Evas_Gl_Symbols glsym_evas_gl_symbols = NULL;
61Evas_Gl_Extension_String_Check _ckext = NULL;
61 62
62Evas_GL_Common_Context_New glsym_evas_gl_common_context_new = NULL; 63Evas_GL_Common_Context_New glsym_evas_gl_common_context_new = NULL;
63Evas_GL_Common_Context_Call glsym_evas_gl_common_context_flush = NULL; 64Evas_GL_Common_Context_Call glsym_evas_gl_common_context_flush = NULL;
@@ -169,6 +170,7 @@ eng_gbm_shutdown(Evas_Engine_Info_GL_Drm *info)
169static void 170static void
170symbols(void) 171symbols(void)
171{ 172{
173 Evas_Gl_Extension_String_Check glsym_evas_gl_extension_string_check = NULL;
172 static Eina_Bool done = EINA_FALSE; 174 static Eina_Bool done = EINA_FALSE;
173 175
174 if (done) return; 176 if (done) return;
@@ -203,6 +205,9 @@ symbols(void)
203 LINK2GENERIC(eglGetProcAddress); 205 LINK2GENERIC(eglGetProcAddress);
204 LINK2GENERIC(evas_gl_common_eglCreateImage); 206 LINK2GENERIC(evas_gl_common_eglCreateImage);
205 LINK2GENERIC(evas_gl_common_eglDestroyImage); 207 LINK2GENERIC(evas_gl_common_eglDestroyImage);
208 LINK2GENERIC(evas_gl_extension_string_check);
209
210 _ckext = glsym_evas_gl_extension_string_check;
206 211
207 done = EINA_TRUE; 212 done = EINA_TRUE;
208} 213}
@@ -236,7 +241,7 @@ eng_egl_symbols(EGLDisplay edsp)
236 FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL", 241 FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL",
237 glsym_func_uint); 242 glsym_func_uint);
238 243
239 if (strstr(exts, "EGL_IMG_context_priority")) 244 if (evas_gl_extension_string_check(exts, "EGL_IMG_context_priority"))
240 _extn_have_context_priority = 1; 245 _extn_have_context_priority = 1;
241 246
242 done = EINA_TRUE; 247 done = EINA_TRUE;
@@ -262,15 +267,15 @@ gl_extn_veto(Render_Engine *re)
262 glsym_eglSwapBuffersWithDamage = NULL; 267 glsym_eglSwapBuffersWithDamage = NULL;
263 glsym_eglSetDamageRegionKHR = NULL; 268 glsym_eglSetDamageRegionKHR = NULL;
264 } 269 }
265 if (!strstr(str, "EGL_EXT_buffer_age")) 270 if (!_ckext(str, "EGL_EXT_buffer_age"))
266 _extn_have_buffer_age = 0; 271 _extn_have_buffer_age = 0;
267 272
268 if (!strstr(str, "EGL_KHR_partial_update")) 273 if (!_ckext(str, "EGL_KHR_partial_update"))
269 glsym_eglSetDamageRegionKHR = NULL; 274 glsym_eglSetDamageRegionKHR = NULL;
270 275
271 if (!strstr(str, "EGL_EXT_swap_buffers_with_damage")) 276 if (!_ckext(str, "EGL_EXT_swap_buffers_with_damage"))
272 glsym_eglSwapBuffersWithDamage = NULL; 277 glsym_eglSwapBuffersWithDamage = NULL;
273 if (strstr(str, "EGL_EXT_image_dma_buf_import")) 278 if (_ckext(str, "EGL_EXT_image_dma_buf_import"))
274 dmabuf_present = EINA_TRUE; 279 dmabuf_present = EINA_TRUE;
275 } 280 }
276 else 281 else
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.h b/src/modules/evas/engines/gl_drm/evas_engine.h
index a6a3fad177..705d565d4f 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.h
+++ b/src/modules/evas/engines/gl_drm/evas_engine.h
@@ -67,6 +67,7 @@ extern Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_lock;
67extern Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_unlock; 67extern Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_unlock;
68extern Evas_Gl_Symbols glsym_evas_gl_symbols; 68extern Evas_Gl_Symbols glsym_evas_gl_symbols;
69extern void * (*glsym_eglGetProcAddress) (const char *a); 69extern void * (*glsym_eglGetProcAddress) (const char *a);
70extern Evas_Gl_Extension_String_Check _ckext;
70 71
71typedef struct _Render_Engine Render_Engine; 72typedef struct _Render_Engine Render_Engine;
72struct _Render_Engine 73struct _Render_Engine
diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index b28dd57f9d..4ab45bd694 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -151,7 +151,7 @@ _evas_outbuf_init(void)
151 const char *exts; 151 const char *exts;
152 152
153 exts = eglQueryString(NULL, EGL_EXTENSIONS); 153 exts = eglQueryString(NULL, EGL_EXTENSIONS);
154 if (exts && strstr(exts, "EGL_EXT_platform_base")) 154 if (_ckext(exts, "EGL_EXT_platform_base"))
155 { 155 {
156 dlsym_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC) 156 dlsym_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC)
157 eglGetProcAddress("eglGetPlatformDisplayEXT"); 157 eglGetProcAddress("eglGetPlatformDisplayEXT");