From 5c3bfe0e4ddea18c0d44b26cc3b950f9dbf9349f Mon Sep 17 00:00:00 2001
From: Andras Becsi <andras.becsi@theqtcompany.com>
Date: Thu, 4 Dec 2014 17:59:06 +0100
Subject: [PATCH] Check for EGL_KHR_fence_sync instead of EGL_KHR_reusable_sync

We create an EGL_KHR_fence_sync on the chromium thread
but try to verify if the wait function implementation
is available by testing for the EGL_KHR_reusable_sync
extension in the scene graph thread.
Since the latter extension is not supported by most of
our devices, we never actually waited for the rendering
to finish.

Change-Id: Ied829d4035d42899cfb3f86de018bc48e61c0cc0
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
---
 src/3rdparty                      | 2 +-
 src/core/delegated_frame_node.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/3rdparty b/src/3rdparty
index 577cd47e5..be4ec3fa6 160000
--- a/src/3rdparty
+++ b/src/3rdparty
@@ -1 +1 @@
-Subproject commit 577cd47e54bb88c81b7a5b5a6d658d8d61b2c747
+Subproject commit be4ec3fa64a4c6c2b641830a9811ab7847c7dd39
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 1a393a0c7..e12873c81 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -218,7 +218,7 @@ static void waitChromiumSync(gfx::TransferableFence *sync)
         static PFNEGLCLIENTWAITSYNCKHRPROC eglClientWaitSyncKHR = 0;
 
         if (!resolved) {
-            if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_reusable_sync")) {
+            if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
                 QOpenGLContext *context = QOpenGLContext::currentContext();
                 eglClientWaitSyncKHR = (PFNEGLCLIENTWAITSYNCKHRPROC)context->getProcAddress("eglClientWaitSyncKHR");
             }
@@ -261,7 +261,7 @@ static void deleteChromiumSync(gfx::TransferableFence *sync)
         static PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR = 0;
 
         if (!resolved) {
-            if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_reusable_sync")) {
+            if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
                 QOpenGLContext *context = QOpenGLContext::currentContext();
                 eglDestroySyncKHR = (PFNEGLDESTROYSYNCKHRPROC)context->getProcAddress("eglDestroySyncKHR");
             }
-- 
GitLab