aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* Update license headers and add new licensesJani Heikkinen2014-08-2561-1159/+671
| | | | | | | | | - 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>
* Add const & to argumentsAlbert Astals Cid2014-08-248-16/+16
| | | | | Change-Id: I1bcf69638fee32b6e6565b8ea828c0adcff48a67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Remove duplicated wordsTopi Reinio2014-08-121-1/+1
| | | | | | | | Removes duplicated (repeated) words and fixes other minor documentation issues. Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Cleanup: Get rid of __data membersSimon Hausmann2014-07-221-4/+0
| | | | | | | These are not needed anymore Change-Id: Ib834aa294e84ca9fbdd5b6850d5bc172e8b54ba1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix Managed::as<>() methodLars Knoll2014-07-221-1/+1
| | | | | | | | | | | | | | | The as<> casting method was not doing the right thing in 100% of the cases. It only checked if the object in question was exactly of the type being asked for. It however didn't check if the object was derived from the type. This commit fixes this by adding a parent chain to the vtables, that is then being used to check this safely at runtime. Change-Id: I9e0b13adbda668aee8c7451e2bb71cd6d4e316d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Change the object allocation schemeSimon Hausmann2014-07-221-1/+1
| | | | | | | | | Instead of allocating the data directly, centralize the object and its ::Data allocation in one place in the memory manager. This is in preparation for additional pointer indirection later. Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Start implement new Object creation patternLars Knoll2014-07-221-10/+7
| | | | | | | | | Create objects through a static create() method that returns a pointer to the objects Data. This will later on simplify breaking the direct connection between Object and Object::Data. Change-Id: Id8daa3c766429bc36f432868e1957846147c96b6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert ExecutionContext to new storage schemeLars Knoll2014-07-221-15/+15
| | | | | Change-Id: I9fcc13da5360f37cef3149b114ed9263b9b74281 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename V4_OBJECT_NEW back to V4_OBJECTLars Knoll2014-07-221-1/+1
| | | | | | | | The _NEW variant was there only temporarily to aid converting to the new data layout. Change-Id: I1d126ee0999c8f0a49f5a08c2e8c090497dd6dd5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert QQuickParticleData to new data layoutLars Knoll2014-07-221-26/+31
| | | | | Change-Id: I6f946272f285cca18e2d08cd69c1bdd0c93faa25 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devSimon Hausmann2014-06-131-1/+7
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: Id4b080aea713df68608847bb82570231e37ce536
| * Fix EllipseShape for Affectors in QtQuick.ParticleDaniel Oberländer2014-06-121-1/+7
| | | | | | | | | | | | | | | | | | EllipseShape was theated like rectangles if set as shape in an Affector due to an unimplemented containment check (was marked as TODO in source code). This fix implements the missing check. Change-Id: I8df1406f147c56e799531fccf4963110c9fdd8ef Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-06-041-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | The merge conflict is about the removal of "d1" from the register set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b was reverted to what it was before, per Laszlo's advice. Conflicts: src/qml/jit/qv4isel_masm.cpp Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
| * Fix potential null pointer dereferencingFrederik Gladhorn2014-05-301-0/+1
| | | | | | | | | | | | | | | | | | These were found by http://www.viva64.com/en/b/025 most issues are rather cosmetic. Change-Id: I7cc12610aae6a43d26bedb9b480863c0695ddfa3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Avoid direct GL calls in QuickLaszlo Agocs2014-05-231-1/+1
|/ | | | | Change-Id: I9b8673fb3292c9d5ad2f9e8e63f56dc661699be6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Follow QOpenGLContext API renamingLaszlo Agocs2014-04-252-8/+8
| | | | | | Task-number: QTBUG-38564 Change-Id: Ice1170339f7d650fcb6accfccf325471629343d6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Initialize variables in QQuickItemParticleGunnar Sletta2014-04-041-1/+1
| | | | | | Change-Id: I42a7b1481014e06e25ab4d9d6f2f36fb3515f735 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Dynamic GL in QuickLaszlo Agocs2014-03-182-42/+43
| | | | | | | | | | The counterpart to I716fdebb. Implements the dynamic path in scenegraph. Task-number: QTBUG-36483 Change-Id: I2dc613ba84560b7b8e36d3cd1da61c050ab08db0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Doc: Document signals (not handlers) under \qmlsignalSze Howe Koh2014-03-184-11/+16
| | | | | | | | Append the handler names to the end of the corresponding signal doc. Task-number: QTBUG-35846 Change-Id: I3d627ba7ed5be94e5c402ab092b4d582536499e8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Optimize QQuickItemParticle::prepareNextFrame().Volker Krause2014-02-201-3/+4
| | | | | | | | | | This moves one hash lookup out of the inner loop, and most importantly avoids detaching both the particle group hash and the particle data vector on every iteration of the inner loop. Change-Id: If9a127b347367ac9dc1e8ee738ff914784adb896 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Rename some filesLars Knoll2014-01-311-1/+1
| | | | | | | | | | | | Rename qv4value_def_p.h -> qv4value_p.h and qv4value_p.h to qv4value_inl_p.h. It makes more sense to have the class definition in the file that is named after the class and move the inline methods into a _inl file. Doing this now, as I expect we'll be needing a few more _inl files soon. Change-Id: Ib59e9380e9e976254c6b4369574157f39b1b5f51 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Split ManagedVTable into two classesLars Knoll2014-01-211-3/+3
| | | | | | | | Keep the basic methods in ManagedVTable, but have the Object related stuff in an ObjectVTable class. Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix some typos in documentation.Jeff Tranter2014-01-092-2/+2
| | | | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I2d91518900c9b60ee8e8a8f549c88a1d50632b3d Reviewed-by: Nico Vertriest <nico.vertriest@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-12-301-1/+1
| | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>