diff --git a/recipes-liri/liri-eglfs/liri-eglfs/0002-qeglfskmsgbmscreen-remove-frame-recording-completely.patch b/recipes-liri/liri-eglfs/liri-eglfs/0002-qeglfskmsgbmscreen-remove-frame-recording-completely.patch index c698b5cc..30b0107a 100644 --- a/recipes-liri/liri-eglfs/liri-eglfs/0002-qeglfskmsgbmscreen-remove-frame-recording-completely.patch +++ b/recipes-liri/liri-eglfs/liri-eglfs/0002-qeglfskmsgbmscreen-remove-frame-recording-completely.patch @@ -13,11 +13,11 @@ Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- - .../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 -#include - #include - #include -@@ -348,59 +347,7 @@ void QEglFSKmsGbmScreen::flip() + #include + #include +@@ -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(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(); -- -- // 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) diff --git a/recipes-liri/liri-eglfs/liri-eglfs_git.bb b/recipes-liri/liri-eglfs/liri-eglfs_git.bb index 3642a464..f038b8e7 100644 --- a/recipes-liri/liri-eglfs/liri-eglfs_git.bb +++ b/recipes-liri/liri-eglfs/liri-eglfs_git.bb @@ -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 \