summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2014-03-21 16:02:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-01 15:01:41 +0200
commit36649887e8ba8841b45522a772cf83b5c5130fca (patch)
tree123a5a79b8dcb765bfa8dd5dcca59c693ec8fea0 /src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
parentd2b54b360ec0cedf2dfd64c72cc8f476fb93bc7c (diff)
QNX: Remove most of the CPU overhead for video rendering
This patch uses the GL_OES_EGL_image extension to create a OpenGL Texture handle for a libscreen pixmap. If the extension is not available it uses the "old" technique as fallback where the image data is copied into a QImage. This reduces the CPU load by more than 70% and allows HD videos to be played jitter-free. Task-number: QTBUG-37752 Change-Id: I4cad22c39390e4cf9eb5be5f0bfe446544a11b9e Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp')
-rw-r--r--src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
index cd03cd6b..64773248 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
@@ -201,6 +201,16 @@ 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<QObject*>();
+ if (obj) {
+ QEvent ev(static_cast<QEvent::Type>(QEvent::User + 1));
+ obj->event(&ev);
+ }
+ }
+#endif
if (m_frameChanged) {
if (videoNode && videoNode->pixelFormat() != m_frame.pixelFormat()) {