From e04f58b58b3fd55786e3bc4ef5e8db10327aee1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Fri, 22 Mar 2019 15:51:42 +0100
Subject: [PATCH] qeglfskmsgbmscreen: remove frame recording completely
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Maybe I am paranoid but it is at least questionable what it is good for
* It seems causes build trouble for at least iMX/vivante [1]

[1] https://github.com/schnitzeltony/meta-qt5-extra/issues/67

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 .../deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
index cc09499..dc265f6 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
@@ -45,7 +45,6 @@
 #include "qeglfsintegration_p.h"
 
 #include <QtCore/QLoggingCategory>
-#include <QOpenGLFunctions_3_0>
 
 #include <QtGui/private/qguiapplication_p.h>
 #include <QtGui/private/qtguiglobal_p.h>
@@ -428,7 +427,11 @@ void QEglFSKmsGbmScreen::flip()
 
 void QEglFSKmsGbmScreen::recordFrame(EGLClientBuffer bo, int width, int height)
 {
-    // Create EGL image from BO
+    Q_UNUSED(bo);
+    Q_UNUSED(width);
+    Q_UNUSED(height);
+    qWarning("Frame recording is not supported on embedded devices!");
+    /*// Create EGL image from BO
     EGLImage image = eglCreateImage(display(), nullptr, EGL_NATIVE_PIXMAP_KHR, bo, nullptr);
     if (image == EGL_NO_IMAGE_KHR) {
         qCritical("Error creating EGLImage: %s", formatGLError(glGetError()));
@@ -480,7 +483,7 @@ void QEglFSKmsGbmScreen::recordFrame(EGLClientBuffer bo, int width, int height)
     // Free resources
     funcs->glDeleteTextures(1, &texture);
     funcs->glDeleteFramebuffers(1, &framebuffer);
-    eglDestroyImage(display(), image);
+    eglDestroyImage(display(), image);*/
 }
 
 void QEglFSKmsGbmScreen::pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
-- 
2.20.1

