summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-03-08 11:15:05 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-03-08 11:33:31 -0600
commit37b9a246ba156063d9756792bd735088bcd59dc5 (patch)
tree50e59a3d3d686b4b09226729ae3a7dda037b54ca /src/modules/evas/engines
parent3a15195088d786c87633e4c875153ad2ccdd97d2 (diff)
gl_drm: Check EGL client extensions before using platform_base
The comment here was right, we shouldn't just trust these without testing if we should trust these.
Diffstat (limited to 'src/modules/evas/engines')
-rw-r--r--src/modules/evas/engines/gl_drm/evas_outbuf.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index a648b96d54..b28dd57f9d 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -144,15 +144,21 @@ static Eina_Bool
144_evas_outbuf_init(void) 144_evas_outbuf_init(void)
145{ 145{
146 static int _init = 0; 146 static int _init = 0;
147
147 if (_init) return EINA_TRUE; 148 if (_init) return EINA_TRUE;
148#ifdef EGL_MESA_platform_gbm 149#ifdef EGL_MESA_platform_gbm
149 /* FIXME: Pretty sure we should be checking if EGL_EXT_platform_base 150 {
150 * exists before looking these up and trusting them? 151 const char *exts;
151 */ 152
152 dlsym_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC) 153 exts = eglQueryString(NULL, EGL_EXTENSIONS);
153 eglGetProcAddress("eglGetPlatformDisplayEXT"); 154 if (exts && strstr(exts, "EGL_EXT_platform_base"))
154 dlsym_eglCreatePlatformWindowSurfaceEXT = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) 155 {
155 eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"); 156 dlsym_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC)
157 eglGetProcAddress("eglGetPlatformDisplayEXT");
158 dlsym_eglCreatePlatformWindowSurfaceEXT = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)
159 eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT");
160 }
161 }
156#endif 162#endif
157 _init = 1; 163 _init = 1;
158 return EINA_TRUE; 164 return EINA_TRUE;