From c1cfbd98d2c03a2aff305c4fc190424906d7f465 Mon Sep 17 00:00:00 2001 From: Dan Cape Date: Fri, 22 Apr 2016 14:40:23 -0400 Subject: QNX: Avoid reading frames faster than they're rendered The previous code would capture frames with a 60Hz timer into two pixmaps alternating pixmaps with each successive frame. Rendering was somewhat disconnected from this, if rendering was unable to occur at 60fps, multiple frames might be copied for each frame rendered. This meant that it might try copying a video frame into a pixmap that was currently being used by the GPU with bad effects. The primary effect being severe flicker on i.mx6 targets. The change is to ensure that we don't read the window data until we're just about to make use of it. This means we don't ever get ahead of ourselves and read the video window once for every frame rendered. The code has been significantly refactored. There is now a class that manages the pixmaps and egl images. This is created on demand and the images are created and destroyed when sizes change. Since this all now occurs in the proper thread, much of the nonsense of setting _q_GLThreadCallback to arrange a call from the render thread is avoided. Remove BlackBerry ifdefs that are no longer used. Change-Id: I4bf5efa4c39c8170e3f55499c167ee10e521e100 Reviewed-by: James McDonnell Reviewed-by: Rafael Roquetto --- src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp') diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp index 70d48dd97..fbe8a62f9 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp @@ -282,16 +282,6 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode, obj->event(&ev); } } -#if defined (Q_OS_QNX) // On QNX we need to be called back again for creating the egl images - else { - // Internal mechanism to call back the surface renderer from the QtQuick render thread - QObject *obj = m_surface->property("_q_GLThreadCallback").value(); - if (obj) { - QEvent ev(static_cast(QEvent::User + 1)); - obj->event(&ev); - } - } -#endif bool isFrameModified = false; if (m_frameChanged) { -- cgit v1.2.3