aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
Commit message (Collapse)AuthorAgeFilesLines
* Simplify & speed up function callingLars Knoll2013-11-091-11/+11
| | | | | | | | | Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add missing Q_INIT_RESOURCETor Arne Vestbø2013-11-051-0/+7
| | | | | | | | | | The library needs to do Q_INIT_RESOURCE for all resources it uses internally, otherwise static linking will fail, and the user has no idea how to rectify it as the name of the missing resource is not known. Change-Id: I8ea766e63cff22bbb0c45e6125c3a07948de2274 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | Change-Id: Ie7408409ddbaa354370267f2dd74326ec56a4186 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Refactor shaders into seprate GLSL source filesSean Harmer2013-10-319-244/+308
| | | | | | | | | | | | | | | | | | | | | | The default implementation of QSGShaderMaterial::vertexShader() and fragmentShader() now loads the GLSL source from a list of source files that can be specified via the setShaderSourceFile() or setShaderSourceFiles() functions. Multiple shader source files for each shader stage are supported. Each source file will be read in the order specified and concatenated together before being compiled. The other places where Qt Quick 2 loads shader source code have been adapted to use the new QSGShaderSourceBuilder, which is also used internally by QSGMaterial. This puts Qt Quick 2 into a better state ready to support OpenGL core profile and to load different shaders based upon OpenGL version, profile, GPU vendor, platform, etc. Change-Id: I1a66213c2ce788413168eb48c7bc5317e61988a2 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Load image data on main threadAlan Alpert2013-10-302-25/+34
| | | | | | | | | QQuickPixmap use should be done on the main thread, if not it can lead to an exception when creating the file loading thread (owned by the engine). Change-Id: Id59cec4312ecdee537dcba85778bd90ea4433b2e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Work around Nouveau driver bugsGunnar Sletta2013-10-301-0/+6
| | | | | Change-Id: I25311a2bd88f41087352e0a43ba505f4e27b7e85 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make sure custom particles mark themselves dirty.Gunnar Sletta2013-10-291-1/+4
| | | | | | | Task-number: QTBUG-34396 Change-Id: I3a012166489cb36b923ff794bf9ac26c4bae0508 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid side effects when en exception has been thrown.Lars Knoll2013-10-291-3/+3
| | | | | | | | | | | | | | We don't want to check for exceptions after every single line on our runtime methods. A better way to handle this is to add the check in all methods that have direct side effects (as e.g. writing to a property of the JS stack). We also need to return whereever we throw an exception. To simplify the code, ExecutionContext::throwXxx methods now return a ReturnedValue (always undefined) for convenience. Change-Id: Ide6c804f819c731a3f14c6c43121d08029c9fb90 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't use reserved keyword "texture" as uniform variable nameSean Harmer2013-10-211-11/+11
| | | | | | | | | | The "texture" keyword is a function name in OpenGL core profile. This commit is in preparation for making the Qt Quick 2 renderer and materials work with a core profile context. Change-Id: Iad243e64ab8db739fc46b85bb626bdb8b9ceb208 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-0225-157/+157
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix CallContext to not hold arguments on the C stack anymoreLars Knoll2013-09-281-15/+20
| | | | | Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix API of QQmlV4HandleLars Knoll2013-09-264-10/+10
| | | | | Change-Id: Iac4a3fefebd33a5990408598486231a5add8e639 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Persistent/WeakValue APILars Knoll2013-09-261-4/+6
| | | | | | | Don't use unprotected Values in the API anymore. Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert putIndexed()Lars Knoll2013-09-223-3/+6
| | | | | Change-Id: I7d02b0fdf45079d0f7afcfb6d3158dd60cb09f33 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup Object::define*Property APILars Knoll2013-09-221-4/+4
| | | | | Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Further work towards an exact GCLars Knoll2013-09-221-14/+24
| | | | | | | | | | | Add some more convenience in the helper classes in qscopedvalue_p.h Make accesses to CallData safer, and change ExecutionEngine::newObject() to return a safe pointer. Change-Id: I980909754ce9681cf6faa1355bab3a1e5d6dd186 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert more methods to return a Returned<>Lars Knoll2013-09-183-9/+12
| | | | | Change-Id: If294c9c4f574824c308b63a11da1337226180105 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert builtin methods to return a ReturnedValueLars Knoll2013-09-181-22/+22
| | | | | Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-1226-130/+130
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Qquickimageparticle: Simplify codeTobias Hunger2013-09-121-2/+2
| | | | | | | Clang nags about perfLevel < 9999 being always true. Change-Id: I09f46a8cd81f0f7eecdbd5eabd52f8f7ff4603c1 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Move prototype pointer into QV4::InternalClassLars Knoll2013-09-021-1/+1
| | | | | | | | | | | | | The prototype is actually the same for most objects. By moving it into the internal class, we can save 8 bytes per object, as well as allowing for some future optimizations. Also fix a bug in the implementation of the Error prototype objects. Change-Id: I4d4b641055f644a9b088f27be34bfdb0446279b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-08-0617-159/+178
|\ | | | | | | | | | | into dev Change-Id: I278524d0f43d2237201d9cf78c1c36a5ecc83d84
| * std:: fixes to make qtdeclarative closer to compilable with QNX NDK.Petr Nejedly2013-07-264-12/+12
| | | | | | | | | | | | | | Math functions come in std:: when #included through <cmath> Change-Id: I62550e5c23cb6f4464f2c2f5c4188a91b3512d1a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-248-13/+58
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * | Convert v8::Array usage in particles to V4Simon Hausmann2013-06-123-12/+21
| | | | | | | | | | | | | | | Change-Id: Ib3c39903bf8f8507d68f94baea81b3bf642ce8f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Port ParticleData to V4Simon Hausmann2013-06-125-103/+118
| | | | | | | | | | | | | | | Change-Id: Ifc48b73a2fbfda22d3c4419cb34dd5307107f688 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Don't include v8.h from qv8engine_p.h anymoreLars Knoll2013-06-101-0/+2
| | | | | | | | | | | | | | | Change-Id: Idb0f5744f65b28acbe878a3e9d33b4a3946ecab8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Get rid of v8::BooleanLars Knoll2013-05-211-1/+1
| | | | | | | | | | | | | | | Change-Id: I10b4240db78532dfdf972bb0a6f191462d81caaa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Get rid of v8::NumberLars Knoll2013-05-211-3/+3
| | | | | | | | | | | | | | | Change-Id: I38bdf8fe4dd73c61317912ec6308a9a1e870ad99 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Remove v8 dependencies from QQmlV4HandleLars Knoll2013-05-086-12/+12
| | | | | | | | | | | | | | | Change-Id: I87d2183738ec7cfeea846a28f2b9aed79a233f68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Remove v8::persistent usage from particlesLars Knoll2013-05-083-11/+12
| | | | | | | | | | | | | | | Change-Id: I69cd4ccf51c40e2ee63f024a7ccc2d8b35b14ae4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | More steps towards eliminating the v8 layerSimon Hausmann2013-05-071-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | * Changed the return type of the InvocationCallback from a v8 handle to a QV4::Value * Removed v4 auto tests and fixed build of other tests Change-Id: Ic927b925923ca8785170689a5c260969fd1cb794 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Replace v8::Undefined() with QV4::Value::undefinedValue()Simon Hausmann2013-05-071-1/+1
| | | | | | | | | | | | | | | Change-Id: I4c7bb5bcc1bc15a982bb83d2597e6ae4bc5710cd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Get rid of v8::LocalLars Knoll2013-05-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Remove v8::HandleScopeLars Knoll2013-05-034-6/+0
| | | | | | | | | | | | | | | | | | | | | This class never made sense with v4... :) Change-Id: Id597d791d1adf52cc821d6d46f57cb24d1acd343 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Cleanup v8 Context handlingLars Knoll2013-05-034-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need or use v8 Context objects, so it's sufficient to have one global context for now. Remove all code related to entering or leaving Context's. Change-Id: I4f7ddaa4907e59de5713368fa13bbc40e5830542 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | More build fixes.Erik Verbruggen2013-04-192-0/+3
| | | | | | | | | | | | | | | Change-Id: I5421af856e68d8eb0f32ed12cf210b367b5279f9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Rename QQmlV8Handle to QQmlV4HandleLars Knoll2013-04-1910-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+0
| | | | | | | | | | | | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | avoid redundant calls to glActiveTextureGunnar Sletta2013-08-021-4/+1
| | | | | | | | | | | | | | | Change-Id: I00b5c82d76473a10f64f5a3aa0cd19ef88319ed6 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | Remove redundant calls...Gunnar Sletta2013-08-021-5/+0
| |/ |/| | | | | | | | | | | | | | | Geometry ownership only matters when the node is or the entire geometry object is replaced. Accessing the bits in it can be done without any issues. Change-Id: I6da636bc5cdbda03039e00922e599932f4117d1a Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-282-3/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/doc/src/appdevguide/porting.qdoc sync.profile Change-Id: Iec5516c596c3eca60a3e6ceb1d45f2a7a1595c12
| * | Doc fixAlan Alpert2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-31155 Change-Id: I4f1ac7c31ce6d4529c368d796706aa5f93a78d1a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * | pixelIndex -> pixel since image is now 32-bitGunnar Sletta2013-05-071-1/+1
| | | | | | | | | | | | | | | Change-Id: Iac3c8d60d531a93ce6e862dbdfdf53e49e0d2185 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * | Only use emitCap when we run into infinite particlesAlan Alpert2013-05-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitCap is intended to prevent issues with multiple emission of infinite life particles, but it can currently prevent emission of any particles when particleCount() changes after a reset. Tracking particleCount() on changes would be inefficient and be more work to integrate with the correct behavior of infinite particles, so this patch delays the impact of emitCap until an infinite particle is discovered. This will lead to a subtle behavior difference of limiting infinite particle counts based on the count at the first emission, not the first reset, which could be construed as a bug fix in some situations. This seems reasonable as a futher subtle behavior change will be needed in the future to properly support varying counts of infinite particles. Task-number: QTBUG-30915 Change-Id: I4172aee1d03f00cc63ce7c9d12ace052bc41436d Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-292-10/+25
|\| | | | | | | | | | | Change-Id: I35f07a1725af104952f822274763dd7a96a9d560
| * | Optimize particle mask extruderGunnar Sletta2013-04-261-11/+24
| | | | | | | | | | | | | | | Change-Id: Ideed246f49301f826935d3fe4a25a3b593ee6b07 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| * | Re-implemented itemChange must always call QQuickItem::itemChangeShawn Rutledge2013-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation for that fact, and the windowChanged signal. Fix existing QQuickItem subclasses which didn't call QQuickItem::itemChange. Examples should rather connect to the windowChanged() signal. Change-Id: Ieddcdbe69f849ddb120b64be9c5e0a21393b0ed9 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * | Use the actual size of the image for the iteration.Gunnar Sletta2013-04-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | If the rectangle dimension was a floating-point value, we could sample outside the image, causing tons of warnings. Change-Id: I10abece9a6b0cf769551f554fb5999d5d90e4c9d Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-221-0/+9
|\| | | | | | | | | | | Change-Id: I8b0be891402530e38efca46f7cbb679eca5d4a9d