diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-23 17:06:06 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-07-01 11:50:03 +0200 |
commit | 89a3f302d57c3652a66239f20dfd3caa5fb8a889 (patch) | |
tree | efb474e8ac0161552311d001ea18271cb584042f /src/core/gl_surface_qt.cpp | |
parent | 131c199d28aab4577c943756a685acf926606f18 (diff) |
Define DriverEGL::GetPlatformExtensions here
We need access to Qt classes to extract the EGLDisplay.
Change-Id: I4e57aa72f3f7e08a55bc5e9694389e35f258e039
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/gl_surface_qt.cpp')
-rw-r--r-- | src/core/gl_surface_qt.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp index ca0e0350f..19ce59f7e 100644 --- a/src/core/gl_surface_qt.cpp +++ b/src/core/gl_surface_qt.cpp @@ -539,6 +539,22 @@ GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) return NULL; } +std::string DriverEGL::GetPlatformExtensions() +{ +#if defined(USE_X11) + EGLNativeDisplayType nativeDisplay = reinterpret_cast<EGLNativeDisplayType>(GLContextHelper::getXDisplay()); + EGLDisplay display = eglGetDisplay(nativeDisplay); +#else + EGLDisplay display = GLContextHelper::getEGLDisplay(); +#endif + if (display == EGL_NO_DISPLAY) + return ""; + + DCHECK(g_driver_egl.fn.eglQueryStringFn); + const char* str = g_driver_egl.fn.eglQueryStringFn(display, EGL_EXTENSIONS); + return str ? std::string(str) : ""; +} + } // namespace gfx namespace content { |