summaryrefslogtreecommitdiffstats
path: root/src/core/delegated_frame_node.cpp
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-07-07 17:19:49 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-08-06 19:25:30 +0200
commitadcb7979a5f7193d1b8c6b87c0f2c92cfa80a316 (patch)
treea5e6aa33178b20b72d3487a8add6dc3aca0b9f9a /src/core/delegated_frame_node.cpp
parent3b1caeb21a66ca939854b897824e9e853ba60b67 (diff)
Remove duplicate code for egl extensions and native display querying
This is now possible through GLSurfaceQt, and GLContextHelper respectively. Change-Id: I06e13ccdea9737dc41b034befb4f01aa08d72c2a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core/delegated_frame_node.cpp')
-rw-r--r--src/core/delegated_frame_node.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 434530e17..60be2e6cc 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -51,6 +51,7 @@
#include "delegated_frame_node.h"
#include "chromium_gpu_helper.h"
+#include "gl_surface_qt.h"
#include "stream_video_node.h"
#include "type_conversion.h"
#include "yuv_video_node.h"
@@ -206,15 +207,6 @@ static QSGNode *buildLayerChain(QSGNode *chainParent, const cc::SharedQuadState
return layerChain;
}
-#if !defined(QT_NO_EGL)
-static bool hasEGLExtension(EGLDisplay display, const char *name)
-{
- QList<QByteArray> extensions = QByteArray(reinterpret_cast<const char *>(
- eglQueryString(display, EGL_EXTENSIONS))).split(' ');
- return extensions.contains(name);
-}
-#endif
-
static void waitAndDeleteChromiumSync(FenceSync *sync)
{
// Chromium uses its own GL bindings and stores in in thread local storage.
@@ -231,7 +223,7 @@ static void waitAndDeleteChromiumSync(FenceSync *sync)
static PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR = 0;
if (!resolved) {
- if (hasEGLExtension(sync->egl.display, "EGL_KHR_reusable_sync")) {
+ if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_reusable_sync")) {
QOpenGLContext *context = QOpenGLContext::currentContext();
eglClientWaitSyncKHR = (PFNEGLCLIENTWAITSYNCKHRPROC)context->getProcAddress("eglClientWaitSyncKHR");
eglDestroySyncKHR = (PFNEGLDESTROYSYNCKHRPROC)context->getProcAddress("eglDestroySyncKHR");