summaryrefslogtreecommitdiffstats
path: root/src/core/gl_surface_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gl_surface_qt.cpp')
-rw-r--r--src/core/gl_surface_qt.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
index 584bdc227..c905688ce 100644
--- a/src/core/gl_surface_qt.cpp
+++ b/src/core/gl_surface_qt.cpp
@@ -44,7 +44,7 @@
#include <QGuiApplication>
#include "gl_context_qt.h"
-#include "qtwebenginecoreglobal.h"
+#include "qtwebenginecoreglobal_p.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -533,6 +533,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 {