path: root/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
diff options
authorDan Cape <>2016-04-22 14:40:23 -0400
committerYoann Lopes <>2016-04-27 10:58:11 +0000
commitc1cfbd98d2c03a2aff305c4fc190424906d7f465 (patch)
tree56528f42875ef1d93881657ef3711119c5e4989e /src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
parent80deebcee3e9b14046a042cf6a66467ff078d57b (diff)
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 <>
Diffstat (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp')
1 files changed, 0 insertions, 10 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
index 70d48dd9..fbe8a62f 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
@@ -282,16 +282,6 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode,
-#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<QObject*>();
- if (obj) {
- QEvent ev(static_cast<QEvent::Type>(QEvent::User + 1));
- obj->event(&ev);
- }
- }
bool isFrameModified = false;
if (m_frameChanged) {