aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make releaseResources() free the renderer's shader cacheLaszlo Agocs2017-09-041-0/+5
| | | | | | | | | | | | | | Normally all shader programs from materials are cached in a simple table that is alive as long as the renderer exists, in practice this means being tied to the QQuickWindow which is often the entire lifetime of an application. Use releaseResources(), which is mostly a no-op on the scenegraph level at the moment, to free this cache. Task-number: QTBUG-62392 Change-Id: I279e595874fee1ab4fe0dede0843a3686dea5806 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Fix excessive recursion in rendererGunnar Sletta2017-06-191-3/+4
| | | | | | Change-Id: Iffee781932773fe22c7d946b532ba74492e1e2df Task-number: QTBUG-59789 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix QSG_VISUALIZE=batchesBerthold Krevert2017-05-111-0/+4
| | | | | | | | | Since I362e1cb8e10 the batch renderer defaults to QSG_SEPARATE_INDEX_BUFFER which broke the batches visualization Change-Id: If1d51cabb0cc4a3a98ac2c01bd78789d08fe72f7 Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* ICC issue: cast both sides of sign-bit-changing expressions to uintThiago Macieira2017-04-281-1/+1
| | | | | | | | | | | QSGNode::DirtyForceUpdate is 0x8000, so when you shift it left by 16 positions, it becomes the sign bit. Either the result of that shift is int or sn->dirtyState is. qsgbatchrenderer.cpp(302): error #68: integer conversion resulted in a change of sign Change-Id: I84e363d735b443cb9beefffd14b958f9a622348b Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QSGBatchRenderer: Fix a performance regression noted by qmlbenchRobin Burchell2017-04-241-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | 0a88774a0f11bf96a87012ac4a83e31ced19460b switched from using client side pointers to VBOs, ostensibly for core profile support. Unfortunately, some GPUs/drivers seem to suffer quite a bit with these, so only use them if we must. Results for changing_over_isolated_with_clip_rotated.qml: eskil_linux_tx1: Before: Average: 65.6 frames; using samples; MedianAll=65; StdDev=0.894427, CoV=0.0136346 After: Average: 120 frames; using samples; MedianAll=120; StdDev=0, CoV=0 eskil_linux_focault (nvidia) has a similar regression in all branches where the original commit is present, too: 5.6 & v5.8.0 tag: 600 5.8, 5.9 & dev branches: 399 Assuming this is the sole regression in that case and we end up at the original 600 again, that would be a 50% gain there, and an 81% increase on TX1. Change-Id: I44af9e67698356200f9587e77c9409fdb756519d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Silence GCC 7 warnings about implicit fallthrough in Qt codeThiago Macieira2017-04-201-1/+1
| | | | | | | | | | | | | | | This only deals with Qt code. MASM has a lot of those left. We should just update from upstream instead to get the fixes. qv4regalloc.cpp:660:52: warning: this statement may fall through [-Wimplicit-fallthrough=] if (leftSource->type == DoubleType || rightSource->type == DoubleType) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qv4regalloc.cpp:666:13: note: here case OpBitAnd: ^~~~ Change-Id: I7814054a102a407d876ffffd14b6b0e2d6b03689 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix projection matrix for DepthAware QSGRenderNodesLaszlo Agocs2017-01-121-1/+6
| | | | | | | | Unlike renderUnmergedBatches(), renderRenderNode() did not adjust the projection matrix. Change-Id: Ib5a7183a3623d35c85af47205cc22187bad89409 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Propagate root changes to rendernodes tooLaszlo Agocs2017-01-121-0/+4
| | | | | | | | | Otherwise weird things will happen once a node gets turned into a batch root and the rendernodes in the child subtree still refers to their old root. Change-Id: I42b0ba514c2fbeed833f0f665e49b275c19b5686 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix stencil clips with core profile contextsLaszlo Agocs2017-01-041-1/+22
| | | | | | | | Client-side pointers are not supported. Start using a VBO instead. Task-number: QTBUG-57768 Change-Id: Ia7ac9b0838d837b02e8bf99fcd22f0373cb357c9 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Q_CHECK_PTR the result of malloc() in batch rendererUlf Hermann2016-12-201-0/+1
| | | | | | | We want to cleanly crash if it fails. Change-Id: Ib32d3d6ae0c5d58e0a954e55adca8b2c4081a7f5 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Change implementation of shadow nodes to use a double-linked listGunnar Sletta2016-11-101-42/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since eea8fa64ab27854b71f46ef143e35b6c9acbba14, we're seeing increased times in QSGNode::removeChildNode(). The reason for this seems to be that iteration through the linked list is significantly slower than iteration through a QList<> due to that each node needs to be loaded in memory to iterate to the next, compared a more plain sequential pointer compare with QList<>. This implementation changes the nodes to use a circular double-linked list so we can drop the iteration when removing nodes. This brings us slightly better performance than the original QList based implementation while still using the same amount of memory as the single-linked list one. Change-Id: I0b693730f5b82ad7767e507accafd90551e03fbc Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Add optional flags and rect to QSGRenderNodeLaszlo Agocs2016-08-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having rendernodes triggering fullscreen updates with the software backend is not ideal. Therefore, introduce the option of reporting that the rendernode is well-behaving, meaning it only writes inside the reported bounding rectangle. Similarly, the OpenGL batch renderer can keep using the depth buffer when the rendernode is known to behave like the renderer expects. Change-Id: I6acc434432c2504776f26e8917b5434b44be293d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | software: Add support for QSGRenderNodeLaszlo Agocs2016-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have to change getResource() a bit since it turns out it is not suitable currently for backends that do not have a per-window rendercontext and do not implement the interface on the rendercontext. Pass in the window to make sure it can always figure out which window we want the resources for. (we do not want rendererInterface() to return window-specific instances created on the fly, with ownership issues, so stick with the simple model where backends implement the interface on one of their existing classes) To support clipping, QSGRenderNode::RenderState is extended accordingly. Also updated the docs since some claims in the rendernode docs are not true since Qt 5.3. Change-Id: I34779c83926f5231b888fcab7131e873ae97964f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | QSG: prevent in-struct paddingErik Verbruggen2016-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This also shrinks the class by a tiny bit, because the second bool fits inside the padding that was added to the first bool. Change-Id: Ifb3f3f165c5e1666e2787118de5b5fb579a573b9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Fix "inconsistent use of override" warningsErik Verbruggen2016-07-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | If one overriding virtual method is marked as such, all of them should be marked. Change-Id: I29a19d2196a7f1afbb31fba8a4a6f2b345489e3c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Make matrix and clipList setters' appearance more internalLaszlo Agocs2016-05-311-5/+5
| | | | | | | | | | | | | | | | | | | | | And start using them from the batch renderer as well. Change-Id: I20adc3962b06ac712267dc2be95e9e28cea82e21 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into scenegraphngAndy Nichols2016-05-311-1/+1
|\ \ \ | | | | | | | | | | | | Change-Id: I35715e07b6f837f21cd8e8898f19d97af92c6b69
| * | | Fixed another batch of QHash/QMap::values() (mis)useFrank Meerkoetter2016-05-251-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Avoid memory allocations. Change-Id: I0b4cbef6a8c22184781a44d92172d93ac38e778c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-05-241-10/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickopenglshadereffectnode.cpp src/quick/items/qquickshadereffect.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h src/quick/scenegraph/qsgdefaultglyphnode_p.h Change-Id: I3d6874b4e4231a89d2836c04fe8e7f2ef2d698c4
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-6/+4
| |\| | | | | | | | | | Change-Id: I3c6a93917cb46868cdb9dd50566b90c70f67102e
| | * Revert "Avoid rebuiding batches during a material animation"Gunnar Sletta2016-04-271-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 26a230ee0ed68d39d4d13bfeaafd9839ee2a2a00. This optimization breaks when we have a single material change in the scene within a batch as the geometry node does not get visited on the next render. Task-number: QTBUG-52983 Change-Id: Ib385407a9fc35ca03ab18727d1e7b550431416f1 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
| * | QML: Replace qIsFinite with qt_is_finite.Erik Verbruggen2016-04-281-4/+4
| | | | | | | | | | | | | | | | | | | | | The latter can be inlined. Change-Id: I57747b84889390839a17faa1df6d359210ef4adf Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Make rendernode suitable for public consumptionLaszlo Agocs2016-04-201-16/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For non-OpenGL APIs the primary (and likely the only) way to add custom rendering into the Qt Quick scene is via the render node. Other approaches,like the before/afterRendering signals, QQuickFramebufferObject, remain OpenGL-only. (although QQuickFramebufferObject may get a multi-API replacement based on QSGRenderNode at a later time) Note that this is not a generic 3D content integration enabler. It targets creating 2D and 2.5D Quick items with custom rendering via the graphics API in use. Make QSGRenderNode public, enhance the docs a bit and add a releaseResources(). Add a QSGRendererInterface with a query function in QQuickWindow and QSGEngine. The scenegraph adaptation can then return a custom implementation of the interface. This will be necessary to query API-specific values, f.ex. the ID3D12Device and ID3D12CommandList when running with the d3d12 backend. The interface allows querying the API and void* resources. Resources that we know about in advance are enum-based to prevent the QPlatformNativeInterface-like ugliness of string keys. Support is there in the batch renderer already, fix this up according to the new public API, and implement the corresponding bits for the D3D12 renderer. For D3D12, fix also an issue with QSGNode destruction where graphics resources in use were attempted to be final-released without a proper wait. The semantics of changedStates() in QSGRenderNode is changed so that it can be called at any time, including before render(). This is very useful since we can implement some state restoring in a more efficient manner. Added a new example as well. Documentation for QSGRenderNode is heavily expanded. Change-Id: I4c4a261c55791d0e38743a784bc4c05a53b3462d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-04-131-4/+4
|\| | | | | | | | | | | Change-Id: If33197b616de3476811f0161d4ecd8e7d004756c
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-081-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| | * Move Qt Quick scenegraph resources under the :/qt-project.org/ directoryGiuseppe D'Angelo2016-04-011-4/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ib1c2695f86837b02ba4aaf49184421cd464f7c20 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-7/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-011-1/+3
|\| | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
| * Avoid div-by-zero when nothing is rendered.Gunnar Sletta2016-02-261-1/+3
| | | | | | | | | | | | Change-Id: I3eb57baf1812f831335429cc7d2b4424f3cfa785 Task-number: QTBUG-50929 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-16/+22
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove needless use of the ternary operatorFrank Meerkoetter2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes: "** CID 156593: Control flow issues (DEADCODE)". Child can not be null do to while (child) { ... Change-Id: I46a4f23f24bf7e6b71e72b177249587eea57d5ce Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | QSBatchRenderer: Replace Node::children QList with a singly linked list.Robin Burchell2016-01-051-21/+57
| | | | | | | | | | | | | | | | | | | | This reduces transient allocations by 10mb on the Rectangle creation benchmark, at the cost of an additional two pointers per shadow node (and just that pointer -- no additional allocation ala QList is required, so this will actually end up around the same size if not better.) Change-Id: I6c25c93fe31ed892e3c42ed66d6c6656e5d7b38a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fixed assertion failure when using QSG_RENDERER_DEBUG=upload.Jason Erb2015-12-311-12/+14
|/ | | | | | | | Added a check that Batch::drawSets is not empty. Task-number: QTBUG-48439 Change-Id: Ica76363be8c770240dc69c669815a60904e26988 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-261-2/+2
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qml.pro tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: Id47f15a5ab38f8ec79f0a26c92805acba62caac4
| * Scene Graph: Fixed memory leak in QSGBatchRenderer::Renderer::map()Martin Banky2015-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the uncommon case (m_context->hasBrokenIndexBufferObjects() || m_visualizeMode != VisualizeNothing) of mapping a buffer, malloc is called without first freeing the previous malloc. Regression was introduced with: qt5 commit: 9347499e78f03710eaf24af3c1e7ac650d0ef81d qtdeclarative commit: a371bac3fba73f92aaa63a68d8ab1ae81a1d1031 [ChangeLog][QtQuick][Scene Graph] Fixed memory leak in QSGBatchRenderer::Renderer::map() Task-number: QTBUG-48799 Change-Id: I5ef4b7301d390463845aeb192851f86655962499 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Quick: Sanitize reading environment variables.Friedemann Kleint2015-10-261-23/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Move QSGAtlasTexture::qsg_envInt() to qsgrenderer.cpp for reuse as qt_sg_envInt() and add qt_sg_envFloat(). Change-Id: I4c93f16c228d4f537154f389a0fa1427654485f7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Handle QSG_NO_DEPTH_BUFFER correctlyLaszlo Agocs2015-10-141-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Just not requesting a depth buffer is insufficient since there's nothing guaranteeing that the EGL or other implementation will return depthless configs. When the depth buffer is always there, setting the environment variable is futile. To do what the user has requested, the value has to be checked in the renderer too. Change-Id: I1f572bc6f2f5b5aa94070a239d6e871e3421a51f Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-181-18/+25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Support QSGGeometry::lineWidth also in the batched code path.Gunnar Sletta2015-08-171-18/+25
| | | | | | | | | | | | Change-Id: Ifc664b9c718744b9549953e42ac3450a88403dea Task-number: QTBUG-47090 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Avoid rebuiding batches during a material animationJocelyn Turcotte2015-08-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Animating a complete batch of geometries bound by property bindings will cause an unnecessary rebuild of the batch on each animation step even though it will end up with the same batch as in the previous frame. Since the invalidation happens in nodeChanged, any node change in an updatePaintNode might trigger an invalitation if it is compared with a material that hasn't been updated yet. Delay the verification of the DirtyMaterial flag until all materials have been updated, later on in visitNode, to make sure that we call compare only on up-to-date materials. Change-Id: I03c095efc20817813508d959c74b41eae57beedc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix inefficient usages of qDeleteAll()Sérgio Martins2015-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | No reason to iterate through all items to create a temporary QList we don't need. Change-Id: I3c5388f026ded0290afb9dd35fc7934011c4998d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-041-4/+4
|\| | | | | | | | | | | | | | | | | | | | | 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
| * QtQuick: Fix const correctness in old style castsThiago Macieira2015-05-131-4/+4
| | | | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c9589afabc7ade Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add some timing breakdown to QSG_RENDERER_DEBUG=renderGunnar Sletta2015-04-281-1/+29
| | | | | | | | | | Change-Id: Ic7ffb48c1a148036bdb14a912d3407e9a1b3b4fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Restore depth buffer usage when last render node is removedMikko Harju2015-03-181-0/+3
|/ | | | | | | | | Adding a QSGRenderNode to the scene permanently disabled opaque batches by disabling depth buffer usage. Reset the depth buffer usage to the default value once last QSGRenderNode has been removed from the scene. Change-Id: I760afde83ae9eaaf1b5571c37fd0081eb23b1f20 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-031-2/+2
|\ | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4numberobject.cpp Change-Id: I4e66a03ef4d99cec192c9da30c028fd8c1f4ac0d