aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgthreadedrenderloop.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Delay the deletion of QSGTextures until all windows are synchronizedDominik Holland2017-06-161-0/+1
| | | | | | | | | | | | | | | | 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/+1
| | | | | 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>
* | Remove remnants of blackberry platform supportRobin Burchell2017-01-161-1/+1
| | | | | | | | | | | | | | | | The last remnants were removed from qtbase in 5.7 making this all dead code, so match here too. Change-Id: I10f3f1c614562f2a97ade7cdf5002065d6f79e07 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QSGThreadedRenderLoop: Correctly stop the animation timer ...Robin Burchell2017-01-121-1/+7
|/ | | | | | | | | | | | | | | | | | | ... when destroying the last window while it is still visible. For the case of windowDestroyed(), the QQuickWindow can still be isVisible true and isExposed true. Given these circumstances, we would not stop the timer (assuming that we needed to keep it running), but this is actually wrong when we are evaluating a timer change depending on the window being destroyed. By calling startOrStopAnimationTimer again, after the window has been removed from m_windows, we will successfully stop the timer -- the only cost being an unnecessary polish event being sent from the first call (which will be ignored). Task-number: QTBUG-58091 Change-Id: I043ce5d88eafee15019e1c8d41c06d531d1da059 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-8/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Make shader effects configurableLars Knoll2016-10-101-0/+4
| | | | | | | | | | | | | | | | | | Change-Id: I4e7fd5e9781dec7ee6ed8807ca1a51c937f6f9f3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp tests/auto/quick/qquickitem/tst_qquickitem.cpp Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
| | * Remove vsync sleep before rendering first frameMilian Wolff2016-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QSGRenderThread slept for up to one vsync interval before the first frame was rendered. This happened when the QSGRenderContext was not yet initialized and thus a sync could not result in changes. With LTTNG and custom trace points this latency was easily visible before the first frame swap. With perf it can also be checked, when one does: QSG_RENDER_LOOP=threaded perf trace record -m 10M \ -e syscalls:sys_enter_nanosleep,syscalls:sys_enter_ioctl \ --call-graph dwarf qml main.qml ... [ perf record: Captured and wrote 116.731 MB perf.data (14309 samples) ] Then afterwards have a look at the output of perf script --comms QSGRenderThread And you will notice the sleep directly at the start, followed by the bulk of ioctl required to setup the OpenGL contexts: QSGRenderThread 10875 [001] 13940.801449: syscalls:sys_enter_nanosleep: rqtp: 0x7f1ab954cd60, rmtp: 0x7f1ab954cd60 7f1ada3997fd __nanosleep+0x2d (/usr/lib/libpthread-2.23.so) 7f1ada9683ed qt_nanosleep+0x2d (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Core.so.5.7.0) 7f1ada8c73b8 QThread::msleep+0x38 (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Core.so.5.7.0) 7f1abb594320 QSGRenderThread::syncAndRender+0x320 (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Quick.so.5.7.0) 7f1abb598b0c QSGRenderThread::run+0x19c (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Quick.so.5.7.0) 7f1ada8c7f89 QThreadPrivate::start+0x149 (/home/milian/projects/compiled/qt5-5.7-opt/lib/libQt5Core.so.5.7.0) 7f1ada390484 start_thread+0xc4 (/usr/lib/libpthread-2.23.so) 7f1ad982e6dd __clone+0x6d (/usr/lib/libc-2.23.so) ... ioctl follow This change here checks the validity of the render context before sleeping, thereby removing the vsync latency before rendering the first frame. Note that simply skipping the calls to `syncAndRender` from `run` is not an option, as those also trigger the expose event that is required for the initialization to happen eventually. [ChangeLog][QtQuick] The threaded scene graph renderer does not sleep up to one vsync interval before the first frame anymore. Change-Id: If7474d5420e0d4a1d05ccb664c7c6932fa989127 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Ulf Hermann <ulf.hermann@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/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-15/+21
|/ | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-181-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv4debugservice.cpp src/qml/jsruntime/qv4value_inl_p.h src/qml/jsruntime/qv4value_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/qml/qqmlnotifier_p.h src/qml/qml/qqmlproperty.cpp src/quick/items/qquickflickable.cpp src/quick/items/qquicktextedit.cpp tests/auto/quick/qquickwindow/BLACKLIST The extra changes in qqmlbinding.cpp are ported from changes to qqmlproperty.cpp that occurred in parallel with writeBinding() being moved to qqmlbinding.cpp. Change-Id: I16d1920abf448c29a01822256f52153651a56356
| * Delete QQuickWindow's animator driver at the right time.Gunnar Sletta2015-07-041-1/+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>
* | Retrieve services from debug connector, not via static instance()Ulf Hermann2015-08-041-2/+2
| | | | | | | | | | | | | | | | | | This will allow us to remove the instance() methods and create the services from factories in plugins. Also, it allows us to remove the isDebugging member from QQmlEnginePrivate. Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Extract minimal interface from QQmlDebugServer and use it.Ulf Hermann2015-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | This will allow us to move QQmlDebugServer into a plugin. The new QQmlDebugServer is the interface exposed to connection plugins. The interface exposed to services is renamed to QQmlDebugConnector, as technically it doesn't have to be a "server". Change-Id: Id508b8c0a6960228e889f45a437b73060392db39 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove static proxy methods from QQmlDebugServiceUlf Hermann2015-07-291-1/+2
| | | | | | | | | | | | | | | | | | They all internally map to one-liners and just add to binary size and complexity. Especially, the most used one, isDebuggingEnabled(), simply checks if there is a QQmlDebugServer::instance(). Change-Id: Ib269928e08506894d933f6696e34ff0d3acb048b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QSGThreadedRenderLoop::maybeUpdate: Micro-optimize.Robin Burchell2015-06-271-4/+4
| | | | | | | | | | | | | | | | * Put the cheap checks (pointer ones) first * Don't call currentThread twice as it involves a mutex lock/unlock Change-Id: I5df92ea99b034301113e9bd34f8a66df1a7e7dfe Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-041-2/+5
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/quick/items/qquickitemsmodule.cpp src/quick/items/qquicktext.cpp src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/tst_qquickwindow.cpp Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
| * Fix render loop warning about invalid geometry of exposed windows.Friedemann Kleint2015-05-191-2/+4
| | | | | | | | | | | | | | | | | | Do the screen check only for toplevel windows and make warning more verbose. Change-Id: Ie25271fe34c72c1410022afe8a1a9bdccdf7a12f Task-number: QTCREATORBUG-10814 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Create QOpenGLContext with the correct screenv5.5.0-beta1Jan Arne Petersen2015-05-021-0/+1
| | | | | | | | | | Change-Id: I91169e719ac97b8e32805e08d6a1f43caa897f73 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Make it possible to grab() a window after it has been hidden.Gunnar Sletta2015-05-221-6/+7
| | | | | | | | | | | | | | Windows render loop already had this capability. Change-Id: I9391e218568cb6951f9f25d74e732aa5ddf9b5bc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Don't doneCurrent() on hide().Gunnar Sletta2015-05-221-1/+0
| | | | | | | | | | | | | | | | | | | | This hurts interoperability with OpenCL on windows and the other renderloops don't do it either, so to be consistent, lets not. Change-Id: Ie06842957561c8933690633469b8b3a026ff399b Task-number: QTBUG-46273 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-04-281-0/+4
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
| * 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>
* | Added a new render job stage: NoStageMiikka Heikkinen2015-04-151-0/+37
|/ | | | | | | | | | | | | 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>
* Another fix to avoid detaching the m_windows list.Robert Griebl2015-03-251-3/+3
| | | | | | | Just like commit 310fd3ed, this fixes another unnecessary detach. Change-Id: I5108ea5112a4b0e877f86d06868375abb9a80409 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Handle context loss in the threaded render loopLaszlo Agocs2015-03-121-0/+14
| | | | | Change-Id: I3f9219dd2fed15094c2f7d670a981406e601959b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-031-0/+5
|\ | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4numberobject.cpp Change-Id: I4e66a03ef4d99cec192c9da30c028fd8c1f4ac0d
| * Fix memory leak of QSGContext object in QSGThreadedRenderLoopjian liang2015-02-241-0/+5
| | | | | | | | | | | | | | Add destructor for QSGThreadedRenderLoop to destory QSGContext object. Change-Id: I479947eb35a5d7888d45655a9b8e2ece5e30bc33 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>
* | Avoid inadvertent copies of the windows listRoger Maclean2014-12-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of ways in which this code creates temporary copies of the window list, m_windows. This is often benign but there are also places (e.g. startOrStopAnimationTimer) which get non-const references to items which results in m_windows being detached from the temporary resulting in a real copy of the list items. Again the copy is often fairly benign, however, as the code also relies heavily on pointers to items in the list, it can also result in crashes. I think it might be advisable to store a list of pointers to Window structures rather than store the structure themselves as it appears really easy to introduce copies of the list accidentally. The removal of the use of foreach for example is not made here for aesthetics but because it introduces a hidden temporary copy of the list. Change-Id: I504951a897c4fb0cf106f5a4792b5cfcd532ba8f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-291-5/+6
|\| | | | | | | | | | | | | | | | | 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>
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-10-141-3/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4objectiterator.cpp src/qml/jsruntime/qv4objectiterator_p.h src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: Ia54a9acd96530aa6683c228597af0ca25eadec4f
| | * Move syncTimer measurment to the correct place.5.3Josh Arenson2014-09-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | syncTimer was including the time spent waiting for VSYNC on unchanged frames. This was causing the reported value to be much higher than expected. Task-number: QTBUG-40556 Change-Id: Ife759b4e27faf2124ab330be8d1f42d15c4d2d33 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Introduced QQuickCustomRenderStage.Gunnar Sletta2014-10-161-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Use QWindow::requestUpdate in threaded renderloop.Gunnar Sletta2014-10-161-43/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-4/+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
| * | Finally: A default animation driver which doesn't use walltime.Gunnar Sletta2014-09-181-1/+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>
| * | Sync QQuickWindow::update() up with polishAndSync().Gunnar Sletta2014-09-171-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling QQuickWindow::update() on the GUI thread, we would immediately flag the render thread that a repaint was needed and then schedule a polishAndSync. If the render thread completed the current frame before the GUI thread got to polishAndSync, it would repaint right away without syncing with GUI first. Instead of sending the repaint right away, register the need for a full repaint in the window and set it as part of the next sync phase. Change-Id: Ia731fb46724cc79f5391422213b069de9362d002 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * | Select specific features to be recorded when profiling QMLUlf Hermann2014-09-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+12
|/ / | | | | | | | | | | | | | | Like that the timings are more accurate. Task-number: QTBUG-39876 Change-Id: Ia6bdce9c8089417e88797ec3a98c8a3e367f73f2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>