From 15c42ebccb45fcfd2d7d0c6a52af1f81eb1eb706 Mon Sep 17 00:00:00 2001
From: Dan Cape <dcape@qnx.com>
Date: Fri, 19 Jun 2015 16:26:49 -0400
Subject: [PATCH] QNX: Fix video playback on VMWare

Mark eglImage as not supported on VMWare since that path requires
that the image data be in GPU accessible memory which is not the
case for video

Change-Id: I2ea1ec52842adf0bc1ca39c882e6771e6a992c65
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
---
 src/plugins/qnx/common/windowgrabber.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/qnx/common/windowgrabber.cpp b/src/plugins/qnx/common/windowgrabber.cpp
index c16e38206..39d87c781 100644
--- a/src/plugins/qnx/common/windowgrabber.cpp
+++ b/src/plugins/qnx/common/windowgrabber.cpp
@@ -40,6 +40,7 @@
 #include <qpa/qplatformnativeinterface.h>
 
 #include <QOpenGLContext>
+#include <QOpenGLFunctions>
 
 #ifdef Q_OS_BLACKBERRY
 #include <bps/event.h>
@@ -343,6 +344,9 @@ void WindowGrabber::checkForEglImageExtension()
     m_eglImageSupported = m_context->hasExtension(QByteArrayLiteral("GL_OES_EGL_image"))
                           && eglExtensions.contains(QByteArrayLiteral("EGL_KHR_image"));
 
+    if (strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "VMware"))
+        m_eglImageSupported = false;
+
     m_eglImageCheck = true;
 }
 
-- 
GitLab