aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Doc: fix some typos in qsgrenderer.cppJüri Valdmann2017-05-041-2/+2
| | | | | Change-Id: I140e4e35d7841813df6425d0e418aa52660ed03b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: fix some typos in qsgnode.cppJüri Valdmann2017-05-041-6/+6
| | | | | Change-Id: I9ce8f7e9dffbf7fd5280841bbe46d07eaaf9e235 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* 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-262-0/+4
| | | | | 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-202-1/+2
| | | | | | | | | | | | | | | 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>
* Doc: add new enumeration descriptionsNico Vertriest2017-03-302-0/+6
| | | | | | | | | | | qsgmaterial.cpp:416: warning: Undocumented enum item 'DirtyCachedMaterialData' in QSGMaterialShader::RenderState::DirtyState qsgmaterial.cpp:416: warning: Undocumented enum item 'DirtyAll' in QSGMaterialShader::RenderState::DirtyState qsgnode.cpp:104: warning: Undocumented enum item 'DirtySubtreeBlocked' in QSGNode::DirtyStateBit qsgnode.cpp:139: warning: Undocumented enum item 'RenderNodeType' in QSGNode::NodeType qsgengine.cpp:75: warning: Undocumented enum item 'TextureIsOpaque' in QSGEngine::CreateTextureOption Change-Id: Ia51d414151e42eddc5fa1198d3bad3ecbc20e30a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: added doc for parameter windowNico Vertriest2017-02-031-1/+1
| | | | | | | Undocumented parameter 'window' in QSGRendererInterface::getResource() Change-Id: I13cd520ad0b06abe1ad76be7aec83eae5c3e4d7c Reviewed-by: Martin Smith <martin.smith@qt.io>
* Use independent buffer for indicesJesus Fernandez2017-01-271-8/+1
| | | | | | | WebGL does not support using the same buffer for vertices and indices. Change-Id: I362e1cb8e10dc2b4b99f6ce7161c4e3ce8a6f707 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-261-7/+0
|\ | | | | | | | | | | | | | | Conflicts: src/quick/util/qquickutilmodule.cpp tools/qmllint/main.cpp Change-Id: Ic2283f88c293ca7fc776de3e83eb4c7812309d8a
| * Remove documentation references to internal functionsKavindra Palaraja2017-01-131-7/+0
| | | | | | | | | | | | | | | | | | | | QSGOpacityNode::combinedOpacity() and QSGTransformNode::combinedMatrix() are intended to be internal. Task-number: QTBUG-53897 Change-Id: Icc73476eb8af5cdc673f7ce9bacd25ecc75202b5 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-142-5/+32
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I9d87ed86e95b5901a86cc3aa65d7ac39b0b708c2
| * 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>
| * Update QSGRenderNode docs to match realityLaszlo Agocs2017-01-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | Scissor and stencil tests are not actually enabled when invoking render(), meaning rendernode implementations do not clip by default. This has been documented when making the class public in 5.8, but the older list with the OpenGL states still contains contradictory entries which are false since Qt 5.2 or so. Change-Id: I46875b11322585d40962db2c4302602a1410a7b9 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>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-252-0/+2
|\| | | | | | | | | | | | | Conflicts: tools/qmlimportscanner/main.cpp Change-Id: I01e17581f6691a03f83788773364d0cf96319514
| * Q_CHECK_PTR QSGGeometry allocationsUlf Hermann2016-12-201-0/+1
| | | | | | | | | | | | | | | | We want to cleanly crash if they fail, rather than return a null pointer from vertexData(). Change-Id: Ie88adaa9f0977c70ef4a47a59463509dcd15bdcf Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * 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.8' into devLiang Qi2016-12-147-27/+33
|\| | | | | | | | | | | | | | | | | | | | | | | 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
| * Get rid of most QT_NO_FOO usagesLars Knoll2016-11-296-21/+21
| | | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-282-6/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-252-6/+12
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-242-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | OpenVG Scenegraph AdaptationAndy Nichols2016-12-132-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an OpenVG backend for the Qt Quick 2 scenegraph. Should be feature complete now, but there are still some issues that could be improved in future commits: If Rectangle nodes are rendered with a non-affine transform, they will be rendered incorrectly. This is because paths expect affine transformations. The Glyph cache is a bit cheeky in that it's caching paths, but doing so per font size. It shoudln't need to, but right now I've not though up a good way of getting the transform/scale needed when rendering yet. Change-Id: Ie3c4f2df35d14279b0f9f55e0e10a873328c025b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Enable shader disk cache in Qt QuickLaszlo Agocs2016-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I14ee97ee75664c5dfcd229a5be2be6294c936b2c Task-number: QTBUG-55496 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | | Revert "Revert "Revert "Temporarily provide old Type enums in QSGGeometry"""Liang Qi2016-11-231-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix in qtlocation was merged in dev. This reverts commit c3c3ee6def18ec292340983629e80d350d6e53c0. Change-Id: I7f1ba6447668b63f3571b5ef684f2ba413334892 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-234-54/+89
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4object_p.h Change-Id: Iff4d3aba7710a999b8befdc493cbe959e1ce02f9
| * | | QSGRendererInterface: Add Resource suffix for consistencyLaszlo Agocs2016-11-182-8/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: I60e674760725d4c4dd13f53b31c3abb6b09c1790 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Change implementation of shadow nodes to use a double-linked listGunnar Sletta2016-11-102-46/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Revert "Revert "Temporarily provide old Type enums in QSGGeometry""Liang Qi2016-10-241-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To have a new qt5.git dev integration for qtlocation, we need to have the temporary solution in qtdeclartive dev. This reverts commit 9c1e07cd07de3a762e1d8386efdac3c72018a35a. Change-Id: Ic58d7b66a3ba61dd3f4dd575efbe5d090c504073 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-221-9/+1
|\| | | | | | | | | | | | | | | Change-Id: I171c7dbb6a74fe743c2eec63e86e9c0bef7c7dfd
| * | | Revert "Temporarily provide old Type enums in QSGGeometry"Laszlo Agocs2016-10-191-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 186e442 in QtLocation migrated to the new XxxxType naming convention, the temporary old names can be removed. This reverts commit 73c2e2395025b7d17cad0fc97d4a09b2adf46fc2. Task-number: QTBUG-56519 Change-Id: Icf9aa5e16e6590a631f65bc669cf7b8d0acc6996 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-183-86/+114
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| * | | Temporarily provide old Type enums in QSGGeometryLaszlo Agocs2016-10-131-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unblock qt5.git integration of dependent modules like qtlocation. 6df6c10e1af827d06a387e7422176dd310cf83be changes the names of the new-in-5.8 type enums from TypeXxxx to XxxxType as per API review. However QtLocation already uses the TypeXxxx variants. So provide a temporary solution by offering both. Change-Id: Id23db0044f09654bd61b64f401b683a7944cf245 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | | Fix enums in QSGGeometryLaszlo Agocs2016-10-123-86/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor fixes based on comments from the 5.8 API changes review: Revert to using Qt-style enum values (POSITION -> PositionAttribute). Use ByteType, FloatType, etc. instead of TypeByte, TypeFloat, ... Add comments about magic GL values. Add missing docs for Attribute::createWithAttributeType(). Change-Id: I1b8242efd3936f000ce8df6c11ff9ab7affb5713 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-211-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth_p.h Change-Id: I8e86a649d1ef8ad27dc66cc8c290093b2faabc69
| * | | Doc: Remove newline to fix QSGMaterial flags tableLaszlo Agocs2016-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value description cannot have empty lines, otherwise the table formatting is broken. Change-Id: Iea42356f5b49215bd9118c76ad988295dbd76a31 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | | scenegraph: add missing 'override'Anton Kudryavtsev2016-09-163-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and drop redundant 'virtual' Change-Id: Id9354138d5b17383a33d0c2a0a26f0e85122cfc7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Use QByteArrayLiteral more judiciouslyAnton Kudryavtsev2016-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace it with char* literal in overloaded functions. Saves some text size. Change-Id: Iede24c2169d7329aa17c2175b10873c98c27361f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Use QStringBuilder moreAnton Kudryavtsev2016-08-261-3/+3
|/ / / | | | | | | | | | | | | | | | | | | Reduce allocations. Change-Id: I8b8a0d0360e618c65894f1f7c12476b41a1dbc5d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Quick: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-181-2/+2
| | | | | | | | | | | | | | | Change-Id: I3493b16a184fc811289db9e98eff37bb987113a3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Quick: use const (and const APIs) moreAnton Kudryavtsev2016-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add optional flags and rect to QSGRenderNodeLaszlo Agocs2016-08-023-3/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-195-19/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Doc cleanup for D3D12 and SWLaszlo Agocs2016-07-142-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Fix formatting, wrong class names, and remove sprites as an unsupported feature. Add a note about the glslcore file selector. Change-Id: I2caffc4485157d053bb0fffa47fed8ee1d506774 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>