aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
Commit message (Collapse)AuthorAgeFilesLines
...
* | Particles: code clean-up.Erik Verbruggen2016-03-046-36/+69
| | | | | | | | | | | | | | | | | | | | | | Replace QHash<int, QQuickParticleGroupData*> groupData with a QVarLengthArray, and make sure that those integers (== indices) are continuous, re-used, and start at zero. That way a whole bunch of qhash calls, hash node creatrion/deletion, and other overhead is removed. Change-Id: Ie74fab8a3e3c7b6efa15b7b9ceff1d1a3e9820e9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-011-3/+3
|\| | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
| * standardize statement order in project files a bitOswald Buddenhagen2016-02-251-2/+1
| | | | | | | | | | Change-Id: Ie9541cb83397fe2eccd69cd09cf8d9217e6905e2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-1/+2
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I5928f853a1d13b6a73533f9c6f6eae9da0e52a26 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * Fix negative emitRate causing app to hangMitch Curtis2016-02-041-1/+1
| | | | | | | | | | | | Change-Id: Ieb74ab1a1369ca8c70243002e6b6deec86c03dd6 Task-number: QTBUG-50250 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-1961-854/+1220
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Particles: fix expensive iteration over QHash::keys()Anton Kudryavtsev2016-01-182-5/+9
| | | | | | | | | | Change-Id: I02755796e3a5c5a3bb39e125a45d968a750e58e1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-101-2/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h tests/auto/quick/qquicklistview/tst_qquicklistview.cpp tests/auto/quick/qquicktextedit/qquicktextedit.pro tests/auto/quick/qquicktextinput/qquicktextinput.pro Change-Id: I95d2c20a8619e5b8fa361c941a16dd8dce3e04e7
| * Fix typos in ParticleSystem documentationMitch Curtis2016-01-041-2/+2
| | | | | | | | | | Change-Id: I417250992dbba3b67e891b0e929c09f2c95da299 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | QtDeclarative: use prefix ++/-- for iterator typesAnton Kudryavtsev2016-01-091-1/+1
| | | | | | | | | | | | | | | | ... because it's useful for non-primitive types. These were the only two remaining instances in QtDeclarative. Change-Id: I52eba66313e953762d87313ccbd7ee0be9039be1 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-5/+5
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I9588a3e2c7d590e031dd4c66905a79f0d74d3ac8
| * Particle Turbulence image now reads correctly from QRC or local filesAriel Molina2015-12-081-1/+2
| | | | | | | | | | | | | | | | Turbulence was always reading from local files and never reading from QRC files. Change-Id: I93501f136a6934764422e2a914c01f359b054b2e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Turbulence was accidentally deactivated on geometry changedAriel Molina2015-12-081-1/+0
| | | | | | | | | | | | | | | | Geometry changes triggered a grid initialization which removed the reference to the Particle System thus deactivating the Affector, fixed. Change-Id: I56446ae2116a9645d2e4b51c42358cdfb360ee82 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Correct heightmap values for TurbulenceAriel Molina2015-12-071-3/+3
| | | | | | | | | | | | | | | | Turbulence was only taking into account the red component, and it was wrongly using the image sideways. Change-Id: I7f50e44a198993b9ea2ac0a66c1952bf9c7e92fb Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Replace all occurrences of qSNaN() with qQNaN()Ulf Hermann2015-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | We generally don't want to produce signalling NaNs as those cannot be used in any further arithmetic operations. In particular -(qSNaN()) claims it's not a double. Task-number: QTBUG-49753 Change-Id: I23cec4fec2ddf08c02a7d53db7f3b9ba46b6c288 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Private export the ParticleSystem and AffectorAriel Molina R2015-11-242-5/+7
|/ | | | | | | | | | | | | | | | There are several special cases where the particle system is very useful for generating more than just eye candy. An example is a recreation of world weather/wind conditions as seen in http://earth.nullschool.net/ this patch allows for the implementation of similar systems. This patch does not adds features, just adds the macro Q_QUICK_PRIVATE_EXPORT in order to link the classes and derive custom C++ affectors for Qt Quick usage. Task-number: QTBUG-41502 Change-Id: I809d74676b3be73221840c694d7ca3eebe553c02 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-0631-0/+341
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Move remaining objects to new constructor syntaxLars Knoll2015-09-221-4/+3
| | | | | | | Also disable the old way of constructing objects. Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Doc: replace Mac OS X with OS XNico Vertriest2015-07-151-1/+1
| | | | | | | | | | | | Task-number: QTBUG-40759 Change-Id: If21b4551eb95af3370cc21edd7a6721fc06e1346 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-195-7/+7
| | | | | | | | | | | | | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add 28 QList::reserve() callsSérgio Martins2015-06-082-1/+4
| | | | | | | | | | Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix build with QT_STRICT_ITERATORSSérgio Martins2015-05-151-2/+2
| | | | | | | | | | Change-Id: I3df6ac107cb46b3a1b15b80f39d7c6015adcd9ac Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.hLars Knoll2015-04-241-1/+1
|/ | | | | | | | This is a cleaner separation and further reduces include dependencies in the definitions of our basic data structured. Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* qt quick particles: Fix const correctness in old style castsThiago Macieira2015-03-101-5/+5
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c958e1d7c929c0 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* QtQuick: Micro-optimize iterator loops.Friedemann Kleint2015-02-261-2/+5
| | | | | | | Avoid repeated instantiation of end() in loops, use variable instead. Change-Id: I6ab1fe2b82406d5ee91710a0333587ffb82c04d4 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Cleanup math function includes and usageAllan Sandfeld Jensen2015-02-194-20/+14
| | | | | | | | Use std::math on floats and doubles, and qMath on qreals, and only include the math headers actually needed. Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QQuickParticleData: Reorganise fields to drop size from 208 to 200 bytes on ↵Robin Burchell2015-02-122-5/+10
| | | | | | | x86_64. Change-Id: Ide7a70baecf6d1ff3ec8160a2cb47f0bd9955e45 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Update copyright headersJani Heikkinen2015-02-1261-427/+427
| | | | | | | | | 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>
* QQuickItemParticle: Only delete owned particlesAlan Alpert2015-02-042-11/+54
| | | | | | | | | | | | | | | | | A common pattern for ItemParticle (as shown in the particleview.qml example) is to use it to manage movement of a model's delegates. In such a case item management is handled by the user code (which bridges the needs of the Model and the View) and deleting the items in ItemParticle quickly leads to crashes. This change maintains (and improves, due to handling resets) the deletion of delegates created by the ItemParticles, as shown in delegates.qml. This example was expanded with a click to reset feature so as to more clearly see the impact of resets. Task-number: QTBUG-37486 Change-Id: I9de935034c11a7dd2abdd60e7b3bd42867dede9c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* CleanupsLars Knoll2015-01-231-15/+15
| | | | | | | | Simplify some code in BooleanObject Simplify access to call arguments and thisObject Change-Id: I2f8e844019bc587385608beb02f05b15f827535c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove all the setVTable() calls that aren't required anymoreLars Knoll2015-01-211-1/+0
| | | | | | | | The memory manager's allocation methods now set this up correctly for us :) Change-Id: I8492bf732df601f95a1a851fb3804127ffc83935 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QQuickParticleEmitter: Call particleCountChanged by hand on ↵Robin Burchell2015-01-171-2/+1
| | | | | | | | | | | maximumEmittedChanged. Analysis of QObject connections showed that a large number of connections were set up to the particles system. As this particular case is cheap, we can do it inline instead, and avoid the connection-per-instance. Change-Id: Iec2049fff2c257dc39662ef2b5a8ecd75bbd870d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickItemParticle: delete delegates once they are completed.Robin Burchell2015-01-161-1/+1
| | | | | | | | | | | | | This was one gigantic memory leak, if anyone tried to use this functionality, as evidenced by the bug. The comment notes that deletion was only to be done if the items were created by the ItemParticle, but I don't think this makes sense: take()'s documentation doesn't imply that the ownership of the item stays with the creator, and nor does this seem to be a particularly sensible API decision to make, so I'm not going to implement that. Change-Id: I307d77b70c2b4f7b34565865f8efcfe64817be2f Task-number: QTBUG-37486 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Move extension mechanism over to use the v4 engineLars Knoll2015-01-081-8/+7
| | | | | Change-Id: Ib329fc7bcae3c78d962a116f53b2244a71f81228 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use QV4::ScopedObject typedef instead of actual typeOleg Shparber2015-01-031-1/+1
| | | | | Change-Id: I0b68c534ea513a7c230b12114f6b42b069f9864b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use QV4::ScopedArrayObject typedef instead of actual typeOleg Shparber2015-01-033-3/+3
| | | | | Change-Id: I975536745ac6c264aca074f84d223fbec7682d3d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove most of the places where getPointer() is usedLars Knoll2014-12-201-1/+1
| | | | | | | This is no longer required, and simply uglifies the code Change-Id: Iba91a1d7735ebe23a43437f137a488423b6eb743 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-0928-28/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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 \inqmlmodule usage: only use one parameterAlejandro Exojo2014-12-0828-28/+28
| | | | | | | | | | | | | | | | Since the command just links back to the corresponding module page, only the first parameter is used, and the version causes more confusion. Change-Id: I73ed289550c576747132f77b83c1257094059cd1 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Move Object::Data into the Heap namespaceLars Knoll2014-11-081-1/+1
| | | | | | | | | | Change-Id: I9d30081f71b83bc86f5e5714e23396b18c4d54c5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move the throw methods from ExecutionContext to ExecutionEngineLars Knoll2014-11-041-11/+11
| | | | | | | | | | | | | | | | The methods don't require a context, and thus shouldn't be implemented there. Change-Id: If058e0c5067093a4161f2275ac4288aa2bc500f3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-295-18/+40
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickaccessibleattached_p.h src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: I8bf07487a75f9d1b0d6efa5914dd06875fc9654d
| * Fix leaks in QQuickImageParticleJocelyn Turcotte2014-10-274-18/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that ImageData instances, m_shadowData as well as the QSGGeometry of particle nodes are destroyed together with their QQuickImageParticle. Also implement the assignment operator for QQuickParticleData to avoid its v8Datum pointer to be copied over to the shadow datum in getShadowDatum. This would cause a double delete of the QQuickV4ParticleData when trying to call clearShadows() in the destructor. Task-number: QTBUG-36782 Change-Id: Ie03f2be0415daeb7f4f6e5f92295a3ab26a62155 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * QQuickCustomParticle: Check for current OpenGL Context before useAndy Nichols2014-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | QQuickCustomParticle::buildCustomNodes() assumes there is a valid OpenGL context, but when there is not it will simply crash. Instead we check for a valid current OpenGL context first, and return 0 if it is not availalbe. This needed for the Qt Quick 2d Renderer. Change-Id: I6bfcfc8fa9581bfd27015f719fc527c36492eade Reviewed-by: aavit <eirik.aavitsland@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QQuickParticleSystem: Use QVector instead of QList.Robin Burchell2014-10-201-2/+4
| | | | | | | | | | | | | | | | This is more efficient, for the use we're seeing. In addition, reserve the size in advance, to avoid reallocations. Change-Id: I987ee7cea1aa32c4b1aad1246b6e22b87efd9cc6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QQuickParticleSystem: Micro-optimize m_emitters' handling of null pointers.Robin Burchell2014-10-201-4/+9
| | | | | | | | | | | | | | This shaves off around 35ms from samegame setup of a large game. Change-Id: I91cb7e8d8db5da672e0dcf30a3c0bb0fa855c93f Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QQuickParticleSystem: Optimize hash manipulation.Robin Burchell2014-10-201-2/+2
|/ | | | | | | | | | | | | Before even checking the hash, perform the fast (empty string) check. If it's not empty, then do a single hash lookup, not two of them. There's no point doing a second lookup, since if it doesn't exist, we insert anyway. This takes hash manipulation on samegame on a large screen from ~142ms to ~70ms, which is expected. Change-Id: I4e2a099e996f2f5fb95a5b066d7756373a1dbacd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Check for a current QOpenGLContext before useAndy Nichols2014-09-111-0/+3
| | | | | | | | | We can not assume that there will be a current OpenGL context to use in QQuickImageParticle so now there is a check before we make a call to the current context. Change-Id: I0c77895d0b0f1afdf4853c0486fba0ef9a7b883d Reviewed-by: Lars Knoll <lars.knoll@digia.com>