liri-eglfs: upgrade sources to latest

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2019-05-01 13:49:59 +02:00
parent 1eb040fc4b
commit fa63259086
2 changed files with 20 additions and 59 deletions

View File

@@ -13,11 +13,11 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
.../eglfs_kms/qeglfskmsgbmscreen.cpp | 55 +------------------
1 file changed, 1 insertion(+), 54 deletions(-)
.../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 61cc94f..33a7568 100644
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 @@
@@ -25,67 +25,28 @@ index 61cc94f..33a7568 100644
#include <QtCore/QLoggingCategory>
-#include <QOpenGLFunctions_3_0>
#include <QtGui/private/qguiapplication_p.h>
#include <QtFbSupport/private/qfbvthandler_p.h>
@@ -348,59 +347,7 @@ void QEglFSKmsGbmScreen::flip()
#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
- EGLImage image = eglCreateImage(display(), nullptr, EGL_NATIVE_PIXMAP_KHR, bo, nullptr);
- if (image == EGL_NO_IMAGE_KHR) {
- qCritical("Error creating EGLImage: %s", formatGLError(glGetError()));
- return;
- }
-
- // Create GL 2D texture for framebuffer
- GLuint texture;
- glGenTextures(1, &texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glBindTexture(GL_TEXTURE_2D, texture);
- PFNGLEGLIMAGETARGETTEXTURE2DOESPROC imageTexture2D =
- reinterpret_cast<PFNGLEGLIMAGETARGETTEXTURE2DOESPROC>(eglGetProcAddress("glEGLImageTargetTexture2DOES"));
- if (imageTexture2D)
- imageTexture2D(GL_TEXTURE_2D, image);
- else
- qCritical("No glEGLImageTargetTexture2DOES function available");
-
- // OpenGL 3.0 functions
- auto glContext = QOpenGLContext::currentContext();
- auto funcs = glContext->versionFunctions<QOpenGLFunctions_3_0>();
-
- // Bind framebuffer to copy pixels from
- GLuint framebuffer;
- funcs->glGenFramebuffers(1, &framebuffer);
- funcs->glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
- funcs->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0);
- const GLenum status = funcs->glCheckFramebufferStatus(GL_FRAMEBUFFER);
- if (status != GL_FRAMEBUFFER_COMPLETE) {
- qCritical("glCheckFramebufferStatus failed: %s", formatGLError(glGetError()));
- funcs->glDeleteTextures(1, &texture);
- funcs->glDeleteFramebuffers(1, &framebuffer);
- eglDestroyImage(display(), image);
- return;
- }
-
- // Capture to an image
- QImage capture(QSize(width, height), QImage::Format_RGBA8888);
- glViewport(0, 0, width, height);
- glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, capture.bits());
-
- // Post the event
- QCoreApplication::postEvent(QCoreApplication::instance(),
- new Liri::Platform::FrameCaptureEvent(capture));
-
- // Free resources
- funcs->glDeleteTextures(1, &texture);
- funcs->glDeleteFramebuffers(1, &framebuffer);
- eglDestroyImage(display(), image);
+ 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)

View File

@@ -19,7 +19,7 @@ DEPENDS += " \
"
PV = "0.0.0+git${SRCPV}"
SRCREV = "7bbc508bc03ab0f6a6b1633b322a83db5d99ab5b"
SRCREV = "eae17fdb00a874edd67f073f087cc74436c71ea9"
SRC_URI += " \
file://0001-Do-not-enable-recording-by-default-it-requires-GLES3.patch \
file://0002-qeglfskmsgbmscreen-remove-frame-recording-completely.patch \