aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgrenderloop_p.h
Commit message (Collapse)AuthorAgeFilesLines
* D3D12: Implement grabWindowLaszlo Agocs2016-05-061-0/+6
| | | | | Change-Id: Icb8151f26bad68795eb2e1f920297267c880b40b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Added a new render job stage: NoStageMiikka Heikkinen2015-04-151-0/+2
| | | | | | | | | | | | | NoStage allows scheduling jobs for immediate execution on the renderer thread. [ChangeLog][QtQuick][QQuickWindow] Added a render job stage: NoStage Task-number: QTBUG-44953 Change-Id: I918c79f1d095bc27d911a88d81376d146a04313c Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Use QWindow::requestUpdate in threaded renderloop.Gunnar Sletta2014-10-161-0/+1
| | | | | | | | | The default implementation is the same as what we do with the exhaust delay, but it is now possible for platforms to line it up with vsync so the GUI thread doesn't spend so much time being blocked. Change-Id: Ie126f00a1be978608bf2a1db33d80d7f0458590d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Finally: A default animation driver which doesn't use walltime.Gunnar Sletta2014-09-181-2/+0
| | | | | | | | | | | I've wanted this for a long time, but the animation system didn't support it when mixed with timers/pauses. However, because of dfc8f8b5d4a02f33c7f9063c2a28450902a9d863 and 0db3ea4048fe572a256deb343ea5e64a55d98de9 to qtbase, it is now possible. Change-Id: Ic70c181ce49eae90276bd4f22a2d299061f96087 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Make the QtQuick window surface type configurableSimon Hausmann2014-08-081-0/+3
| | | | | | | The default remains OpenGLSurface. Change-Id: I96b400b7aa9c2b0435ea0614598e1b1f32b6d6b2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Destroy render loop when QCoreApplication is cleaned up.Gunnar Sletta2014-03-291-3/+2
| | | | | | | | | Doing it on 'aboutToQuit' meant we would clean it up whenever an application ran QCoreApp::exec() which could be multiple times per application run. Change-Id: I59e06398a551ae7979e3832dff811937037fa106 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix potential crash during shutdown for QQuickWindowsGunnar Sletta2014-03-171-1/+6
| | | | | | | | | | | | | The cleanup() function would deregister the render loop from all windows the render loop had seen, but the render loop doesn't see windows until the window gets a showEvent and for some implementations it was removed as a result of hideEvent. So add explicit tracking to QSGRenderLoop which is managed by QQuickWindow's constructor and destructor. With this, we no longer need the lists from the subclasses, so these functions are removed again. Change-Id: I05e5507ad57e23c80bacd99752654cc7d0890dc1 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Make sure QSGRenderLoop is cleaned up cleanly.Gunnar Sletta2014-03-141-0/+8
| | | | | | | | | | | | | | | | | | | | | e13547c595913c58e6bd6a5ed80fdc729fae7d47 used a global static to clean up QSGRenderLoop which is triggered very late, potentially after SG backend API plugins have been unloaded. This results in crashes when used in combination with scenegraph-playgrounds's customcontext. Partially revert the change and instead clean up at the time of QApp::aboutToQuit and make sure we also disconnect cleanly from all QQuickWindows. This change also ensures that QSGRenderLoop::windowDestroyed() gets called for all QQuickWindows registered with the render loop. This ensures that rendering stops and that scene graph nodes and resources will be cleaned up regardless of whether the application has remembered to delete the window or not. This is a good thing as it makes the scene graph shutdown a bit cleaner. Change-Id: I9cb9093979f8eac05542f118a6ff9cfe5c84f745 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Consolidate context creation failure handling in Quick.Friedemann Kleint2014-03-131-0/+3
| | | | | | | | | Add QQuickWidget::sceneGraphError() equivalent to QQuickWindow::sceneGraphError(), move message formatting code to QQuickWindowPrivate. Change-Id: I18cd4d7e0f6ee1011c29375218dc6a044b0d2cf2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix leak-on-exit of QSGRenderLoop::s_instanceAlex Montgomery2014-01-281-3/+0
| | | | | | | | | s_instance is created with new and never deleted which causes several destructors to never be called. Task-number: QTBUG-35731 Change-Id: Icccb19186958f8bb74c5fd2b4b41165255debc46 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Be even more tolerant towards broken platform behavior.Gunnar Sletta2013-11-221-0/+1
| | | | | | | | | | When the platform (Mac in particular) sends us exposes for windows which are not renderable, we store it for later and fake expose events when we get resized. Task-number: QTCREATORBUG-10814 Change-Id: I909bb5a920550589322afd97ae1834884754cf81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-301-0/+2
| | | | | | | | | | | | | | | | | | | See the task for the full reasoning behind this patch. The threaded renderloop has been refactored to have one window per thread. This is mostly a simplification of the current code path where for loops over multiple windows are turned into if (window). The QSGContext has been split into two classes, QSGRenderContext for which there is one per OpenGLContext. The rest of the patch is name changes and a couple of cleanups in the hopes of simplifying this change. Task-number: QTBUG-33993 Change-Id: I31c81f9694d7da7474a72333169be38de62613c4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Animators - Render thread animation systemGunnar Sletta2013-09-211-0/+2
| | | | | | | | | | | | This introduces 6 new QML types for animating state in the scene graph when the UI thread is blocked. The QObject property being animated is updated after the animation completes. It works also with the "windows" and "basic" render loops, but offer litte benefit then compared to in the "threaded" case. Change-Id: Ic19e47c898c0b8bd53e457db922b3c9c457c8147 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-1/+1
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Set incubation controller when a Window{} is loaded via QQmlApplicationEngineAlan Alpert2013-06-071-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | This was the one convenience that was lost when transitioning templates from QQuickView + Item{} to QQmlApplicationEngine + Window{}. As the default window incubation controller was tied to the first window's frameSwapped, we could easily run into a situation where a secondary window required incubation while the first window was idle. This would then starve the incubation controller. Instead make it so that the renderloop emits "timeToIncubate" once it is done with a renderpass over all windows, so the incubator gets to run once and exactly once per vsync when animating. The incubator logic was also flawed in that it could post a lot of events to itself as a result of incubatingObjectCountChanged and thus starve system events while processing incubation requests. Now we start a timer and don't start it again until we have completed an incubation pass. Task-number: QTBUG-31203 Change-Id: Iea9e2c81efb46bb7875c70ccda0cdc4b3b3e58e7 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove resize hook from QSGRenderLoop, exposureChanged is enough.Gunnar Sletta2013-04-041-1/+0
| | | | | | | | | After much back and forth, I think we have settled on the right approach in QtGui, which is that resizeEvent is pretty much useless as the action happens on the following exposeEvent(). Change-Id: I5e87bda89853907d041f56acf9a2895e540c41f0 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Complete rewrite of threaded render loop.Gunnar Sletta2013-01-181-0/+91
This change starts using the superior implementation of the scene graph render loop which has been worked on in the scenegraph-playground project for a while. It uses a far more straightforward locking/sync paradigm compared to the existing one and is less deadlock and error prone. It also enables the scene graph thread to run on its own when the GUI thread is blocked, enabling threaded animations. This changes also introduces a naming change inside Qt Quick from "Window Manager" -> "Render Loop" as that fits better to what the code does. Change-Id: I1c2170ee04fcbef79660bd7dae6cace647cdb276 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>