aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgwindowsrenderloop.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Delay the deletion of QSGTextures until all windows are synchronizedDominik Holland2017-06-161-0/+10
| | | | | | | | | | | | | | | | With the 'basic' and the 'windows' render loop the scene graph context is shared. Because of this we cannot start deleting textures after the first window is synchronized as it may contain textures needed by the another window, which is not yet synchronized. QWindowPrivate::syncSceneGraph() is not calling endSync() anymore as it doesn't know whether it is the last window or not. Instead the renderloop is now responsible for calling endSync() once this is safe to do. Change-Id: Icb50ebfb447c928e38b41df7e26f3bfafdb4a811 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-111-0/+1
|\ | | | | | | Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
| * Fix hidpi support for opengl window grabbingFilipe Azevedo2017-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | Now set the QImage devicePixelRatio so the content is correct on all screens. Task-number: QTBUG-53795 Change-Id: If94edf901da1285afe9bb847b8973d568a2b7082 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-8/+13
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-8/+13
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renderers added in 5.8 had to be adapted to the changed profiling macros from 5.6. Conflicts: src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp src/quick/util/qquickprofiler_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
| | * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-251-8/+13
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/quick/util/qquickprofiler_p.h Change-Id: I11a89c2a166115d6697adfba09928805643e709e
| | | * QmlProfiler: Explicitly specify the offsets for scene graph eventsUlf Hermann2016-11-241-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The profiler can be switched on in the middle of a frame. In that case the last offset into the timing data would be some random number, which may lead to a crash when recording the sample. However, as we know all the data points we are going to record, we can as well specify where they are supposed to go. The timings themselves may still be random for frames of which we only recorded parts, but the clients can deal with this. Task-number: QTBUG-57304 Change-Id: I1d507f2591516e43d5b3cd25f7939716f2b64ed9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Ensure windows renderloop doesn't stop existing, running, animationsGunnar Sletta2016-11-091-6/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a normal C++ Qt animation running when the animation driver is installed, and we don't have a visible QQuickWindow at that time, the animation will await the QQuickWindow's vsync to be ticked (which might never happen). So don't install the driver until after we've registered started/stopped (which will be called by install) and when m_vsyncDelta is correctly initialized. Change-Id: If36633ba78d8b16afa658ae5279372158a4f7924 Task-number: QTBUG-55521 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Make shader effects configurableLars Knoll2016-10-101-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: I4e7fd5e9781dec7ee6ed8807ca1a51c937f6f9f3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | scenegraph: Port foreach to range-forRobin Burchell2016-07-091-2/+2
| | | | | | | | | | | | | | | Change-Id: I5e7c144e60959b9230c0757b4ad0e035f5f52f58 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into scenegraphngAndy Nichols2016-05-311-1/+1
|\ \ \ | | | | | | | | | | | | Change-Id: I35715e07b6f837f21cd8e8898f19d97af92c6b69
| * | | QQuickWindow: Process a synthetic hover once per frameRobin Burchell2016-05-261-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the limitation that hover only changes when the mouse moves, and (in my opinion) is required to make hover functionality even remotely useful. QtQuick scenes are a dynamic medium, items can move (or change) frequently, so only changing this in response to a user action means it will frequently end up out of date. A very simple example of this is a ListView of delegates that each have a background set on hover: when flicking the list, it won't reset the hover to actually match the item under the mouse. This is now not a (very) expensive operation to do, as deliverHoverEvent does nothing if the item tree in question doesn't have hover enabled. [ChangeLog][QtQuick][MouseArea] Hover state is now updated once per frame. This means that MouseArea::containsMouse property will now be correct even if the mouse is not moving, but items move under the cursor. Likewise the mouse position properties and positionChanged signal will act as if the mouse had moved. Task-number: QTBUG-40475 Task-number: QTBUG-42194 Task-number: QTBUG-33982 Task-number: QTBUG-42578 Task-number: QTBUG-52537 Change-Id: Ic2dcbb45339e11c07f5c6a9c95eb7f64957968eb Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Prefix GL-specific shader effect codeLaszlo Agocs2016-04-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the C++ sources and classes. The QML type name remains the same. No changes in functionality. The shader effect, node, material (and uniform animator and particles and bits and pieces here and there...) are highly interconnected and do not follow the usual design practices for Quick and the scenegraph and the adaptation layer. Therefore while we aim for keeping full compatibility for GL apps, other backends will likely get a different ShaderEffect item implementation. The C++ class QQuickShaderEffect itself is currently a dummy with an unchanged API. It is not in use for now but forms the basis for the implementation for other backends. This will be covered in future commits. Change-Id: Ia39ce4b303f8f33e2f241d11e35fa62423e43127 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | | Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-1/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the Qt Quick module depends on either the OpenGL or OpenGLES headers being available at build time. Since we are adding support for adaptations that do not depend on OpenGL, it should be possible to build Qt Quick in environments that do not have OpenGL development headers. This does present many challenges though because in some cases GL types, and classes that require OpenGL are part of the public APIs. However since these classes were never available when QT_NO_OPENGL was defined, it should be possible to redefine the function signatures under this scenario, since it's not possible to break binary compatibility if there never were any binaries to break compatibility with. One of the bigger changes that was necessary to facilitate this change is creating interfaces out of QSGContext and QSGRenderContext. Here the default behavior was usage of OpenGL directly, even though subclasses could override all OpenGL usage. Making them interfaces should bring QSGContext and QSGRenderContext more in line with the other classes present in the adaptation layer. Change-Id: Iaa54dc0f6cfd18d2da1d059548abf509bd71f200 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* / 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>
* Support alpha in QQuickWindow::grabWindow().Gunnar Sletta2015-10-161-1/+2
| | | | | | Change-Id: I2dd69745427d8f5e882303d2a4de3935ddca02e9 Task-number: QTBUG-48787 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Delete QQuickWindow's animator driver at the right time.Gunnar Sletta2015-07-041-2/+4
| | | | | | | | | | | | For the non-threaded renderloops, we there might be a timer firing before the animationController is cleaned up through deleteLater() which will then reference the deleted QQuickWindow. Rely instead on direct and explicit cleanup at the right time in each render loop. Change-Id: Id81daddae78ce3922d6a932fb21200f2dc7955bb Task-number: QTBUG-33723 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix basic and windows render loops to use the correct screenLaszlo Agocs2015-05-211-0/+1
| | | | | | | | | | | GLX, and potentially other platforms too, require that compatible contexts and surfaces are created with the same screen. This makes Quick functional on X.org configurations where each physical screen represents a separate X screen on the same X display. Change-Id: I03c87819e1aee148c880a3caca13d4a0c5409056 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix a memory leak in the material shader cache.Robert Griebl2015-04-231-0/+4
| | | | | | | | | | | There were multiple problems in the implementation of the shader cache: 1) it was not thread-safe 2) nothing was ever removed from the hash 3) since the keys into the hash are the actual shader source code, problem #2 would lead to serious memory consumption over time Change-Id: I20d1fb2074932e23f89edddba12e68ab8adcbff0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Avoid running anims at 3x speed on WindowsLaszlo Agocs2015-04-131-0/+8
| | | | | | | | | | | | | When there is no render pending, renderWindow() is not called and so there is no blocking for vsync. Advancing the animations without any sleep is wrong in this case and results in animations running at 3x speed in case there is no change in the scenegraph contents. To solve this, import the threaded render loop's sleep call. Task-number: QTBUG-42699 Change-Id: I3658a827af12d4bc2ac05c7b0b29c65e9fc99675 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-1/+0
|\ | | | | | | Change-Id: I54e66e992f5e5d441b8b5394e7a03ec5352e7bf3
| * Don't send deferred delete events from windowDestroyed()Andy Shaw2015-03-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | This is a follow-up to 657766f19b31d83f361fd3c9ad717b207e1dff8c which removed it from the destructor itself. This goes one step further and removes the calls from the windowDestroyed() calls which also sends the deferred deletes. Task-number: QTBUG-40920 Change-Id: I491b79bb600914575ba5565d2862d041726217e8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | 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>
* | Handle context lost in the Windows render loopLaszlo Agocs2015-02-031-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | With ANGLE (which always uses this loop) EGL_CONTEXT_LOST may happen quite often, depending on various factors. It is therefore good to handle this by tearing down and reinitializing the scenegraph. Task-number: QTBUG-43263 Change-Id: I8e985e001f46865ccd814255f39add58fe2a737a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2015-01-161-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4debugging.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject_p.h src/qml/jsruntime/qv4qobjectwrapper.cpp src/quick/scenegraph/shaders/visualization.frag tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
| * Fix timing output from windows render loopLaszlo Agocs2015-01-111-1/+1
| | | | | | | | | | | | | | Print the frame time, not the total, and in milliseconds. Change-Id: Ia7fe3bea8efafcce475c49517d7adab1b3841729 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-091-3/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * Fix not having a context when cleaning up on WindowsLaszlo Agocs2014-11-101-3/+18
| | | | | | | | | | | | | | | | | | | | | | The same old issue surfaces in the windows render loop too. The basic render loop is already fixed, apply a similar patch to the windows one too. Task-number: QTBUG-42213 Change-Id: I07068315f5164014e329b8ce061947c97ae9da61 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-291-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickaccessibleattached_p.h src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: I8bf07487a75f9d1b0d6efa5914dd06875fc9654d
| * Fix disfunctional QQuickRenderControl with multiple screensLaszlo Agocs2014-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a retina and non-retina screen connected resulted in getting no output from QQuickRenderControl and QQuickWidget on the non-retina screen. This is caused by the fact that Quick is blindly calling QWindow::devicePixelRatio(). This approach is wrong when using QQuickRenderControl since the QQuickWindow does not have an actual native window and so devicePixelRatio() merely returns some default value which will definitely be wrong for one of the screens. The patch fixes the problem by introducing QQuickWindow::effectiveDevicePixelRatio(), which, via QQuickRenderControl::renderWindowFor, supports the redirected case too. Task-number: QTBUG-42114 Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Introduced QQuickCustomRenderStage.Gunnar Sletta2014-10-161-1/+2
| | | | | | | | | | | | | | | | | | The purpose of this concept is to make it possible to plug in an external rendering stage, like replacing the GL rendering with a composition step performed by a hardware compositor in QtCompositor. Change-Id: I994b93af443f68a77ca73cf310b5910c49e014c3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-31/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/coreapi/qsgrenderer.cpp src/quick/scenegraph/qsgadaptationlayer.cpp src/quick/scenegraph/qsgrenderloop.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp src/quick/scenegraph/qsgwindowsrenderloop.cpp src/quick/scenegraph/util/qsgatlastexture.cpp src/quick/scenegraph/util/qsgtexture.cpp src/quick/util/qquickprofiler_p.h Change-Id: Ie274c3baf72a8a0711c87d67238d68e2b2887429
| * Fix cleanup of non-threaded render loops.Gunnar Sletta2014-09-241-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They would unconditionally call cleanupNodesOnShutdown on hide(), but QQuickWindow::sceneGraphInvalidated would only be emitted if this was the last window being hidden, leading to an inconsistent state in the application. Since the non-threaded render loops do not support releasing resources (there is one OpenGL context and one QSGRenderContext shared between all windows) we delay cleanup until the window is destroyed. This change also make the render loops track the windows until they are destroyed, similar to what the threaded one does. The purpose of this is to, in the case of dangling windows, only trigger invalidation of the scene graph when the last QQuickWindow is destroyed through QSGRenderLoop::cleanup(). Task-number: QTBUG-41210 Change-Id: I7e12a4f726ebb3e7935c822b6046abb3590c583a Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Select specific features to be recorded when profiling QMLUlf Hermann2014-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some features, like the memory profiler, create huge amounts of data. Often enough, we're not actually interested in all the data available from the profiler and collecting it all can lead to excessive memory consumption. This change enables us to optionally turn various aspects of QML profiling off. Task-number: QTBUG-41118 Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Use QQuickProfiler's own timer to sample eventsUlf Hermann2014-09-121-17/+19
|/ | | | | | | | Like that the timings are more accurate. Task-number: QTBUG-39876 Change-Id: Ia6bdce9c8089417e88797ec3a98c8a3e367f73f2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* 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>
* Use the renamed qt_gl_global_share_contextJocelyn Turcotte2014-08-051-2/+2
| | | | | Change-Id: I438c33a1dc83fd0cd1ec08bb4e4a1257a3216ca2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Properly collect polish timings from all render loopsUlf Hermann2014-07-021-5/+5
| | | | | | | | | | | Previously the polish timings were collected incorrectly from the windows render loop and not at all from the basic render loop. By collecting the polish times at the right places we can get rid of the 2-argument profile macro as well. Task-number: QTBUG-39876 Change-Id: I0b4aaf87162c652b8dcea6cd4f54db053f8312fe Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Use categorized logging for all things scenegraph.Gunnar Sletta2014-07-011-55/+16
| | | | | Change-Id: I865ee838b0fd6c257b7189f24130012b98206fd1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-101-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * Follow QOpenGLContext API renamingLaszlo Agocs2014-04-251-1/+1
| | | | | | | | | | | | Task-number: QTBUG-38564 Change-Id: Ice1170339f7d650fcb6accfccf325471629343d6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Use global context sharing from QtGui instead of QSGContextJocelyn Turcotte2014-04-041-2/+2
| | | | | | | | | | | | | | | | | | This removes QSGContext::sharedOpenGLContext and replace its uses with QOpenGLContextPrivate::globalShareContext, which is also going to be used by QOpenGLWidget and QQuickWidget. Change-Id: I1e296c3e6832f717caaf31ba7d7b27c06249219b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix QQuickView::grabWindow() on retina displaysMorten Johan Sørvig2014-03-201-1/+1
| | | | | | | | | | | | | | | | | | Multiply by window->devicePixelRatio() at all qt_gl_read_framebuffer() call sites. Task-number: QTBUG-35962 Change-Id: If58e4f97fc5d931ba2e222f8cb1a0641d52c3257 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Fix potential crash during shutdown for QQuickWindowsGunnar Sletta2014-03-171-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Compress touch events in QQuickWindow.Gunnar Sletta2014-05-051-0/+5
|/ | | | | | | | | | | | | | Instead of sending multiple touch updates per frame, we store the last one and flush the pending events just before we enter into the scene graph sync phase. [ChangeLog][QtQuick] QQuickWindow will compresses touch events and delivers at most one touch event per frame. Done-with: Robin Burchell <robin.burchell@jollamobile.com> Change-Id: Ia0169bc4a3f0da67709b91ca65c326934b55d372 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Consolidate context creation failure handling in Quick.Friedemann Kleint2014-03-131-27/+2
| | | | | | | | | Add QQuickWidget::sceneGraphError() equivalent to QQuickWindow::sceneGraphError(), move message formatting code to QQuickWindowPrivate. Change-Id: I18cd4d7e0f6ee1011c29375218dc6a044b0d2cf2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Remove isES() usage in scenegraphLaszlo Agocs2014-03-041-1/+1
| | | | | | | | | The error signal patch added some usages of QOpenGLFunctions::isES(). These need to be temporarily removed. Change-Id: Ibd1d8094059020708aefe4b3502ba56d624928b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Introduced a few more signals to QQuickWindow.Gunnar Sletta2014-02-251-0/+4
| | | | | | | | | | | | Also marked the new afterAnimation() signal as \since 5.3 and introduced proper revisioning on the new signals. [Changelog][QtQuick] Added QQuickWindow::afterSynchronizing(), openglContextCreated(), sceneGraphAboutToStop(). Useful for deeper integration with the rendering. Change-Id: I5532b310506c2432325595e55ef9307b8934abee Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>