aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickanimatedsprite.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-301-12/+20
|\ | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| * Quick: Do not send SG updates when AnimatedSprite is not visibleErik Verbruggen2016-09-231-12/+20
| | | | | | | | | | | | Task-number: QTBUG-55935 Change-Id: I475c1bb3e7aae9499b1b07a52f3c10f54c8b3481 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-081-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 resources under the :/qt-project.org/ directoryGiuseppe D'Angelo2016-04-011-2/+2
| | | | | | | | | | | | Change-Id: I7c7745264ff66b7db042e19f6d44124fa78bb86c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-48/+44
|\| | | | | | | Change-Id: Icfa1d61fcc286c3418d4a625de11d2191336fa60
| * AnimatedSprite: don't access deleted scene graph nodesJ-P Nurmi2016-03-031-48/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | It’s a bad idea to store a scene graph paint node as a member variable. First of all, it should not access the node outside updatePaintNode(), that is, outside the render thread. Secondly, the node is owned by the scene graph and may be nuked whenever the scene graph feels so. Some creative re-parenting easily triggers a case where AnimatedSprite ends up accessing a node that was already deleted by the scene graph. Change-Id: I89205ac36333a2fcb094121afa61b6409fda5883 Task-number: QTBUG-51162 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-011-0/+1
|\| | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
| * QQuickAnimatedSprite: fix memory leakTim Blechmann2016-02-241-0/+1
| | | | | | | | | | | | | | | | the QSGGeometryNode owns the geometry, so we need to set the flag to avoid a memory leak Change-Id: Ifaf1e88c437b765a76d7ab4028c63d66413440bb Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
|/ | | | | | | | | | | 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>
* AnimatedSprite: avoid unnecessary redrawsTim Blechmann2015-10-141-4/+16
| | | | | | | | | AnimatedSprite currently triggers a redraw for every update. however this should only be done, when the next frame will actually be different to the current one. Change-Id: I550bd32c02807e4c3f4847fb2608f5ad0cf0a59a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Cleanup math function includes and usageAllan Sandfeld Jensen2015-02-191-1/+1
| | | | | | | | 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>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-091-2/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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 multirow spritesheet rendering in paused stateJoni Poikelin2014-11-211-2/+19
| | | | | | | | | | | | Task-number: QTBUG-42777 Change-Id: I8027f100c593ae7c57df7c952e66cc2b3fae1dd9 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Animations with no frameSync should be synchronized to the start timeJan Arve Saether2014-10-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | (i.e. "start time" means the time when running was set to true) Unfortunately, we reset the timestamp *after* the image had been loaded and assembled in buildNode(), therefore, the first *displayed* frame would always be the first one in the animation regardless of how long time it took to load the image. Change-Id: I6b57a0f69afd3c9140628b874481cdeda1dffce5 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Fixed AnimatedSprite to respect 'loops' properlyJan Arve Saether2014-10-061-13/+19
| | | | | | | | | | | | | | | | | | Previously, AnimatedSprite could stop before it had performed its desired number of loops. Task-number: QTBUG-36338 Change-Id: I9485886681f55d410786f27b4f6afdc72a058202 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Made emission of AnimatedSprite currentFrameChanges consistent.Jan Arve Saether2014-09-121-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the order was wrong and sometimes the currentFrame property did not correspond to the 'arg' argument that was carried by the signal. The order was sometimes like this: [window got exposed, m_running == false] currentFrame: 1, arg: 1 <== Unexpected, its not running [start() got called, m_running == true] currentFrame: 1, arg: 0 <== Unexpected, they are inequal currentFrame: 2, arg: 2 <== Not sure what to expect here The root of the problem was that we would enter prepareNextFrame on startup (due to QQuickWindow::exposeEvent) even if we were in the stopped state. Getting rid of the first invalid emission solved the issue. Change-Id: Iba002ee91d4d1acafcf4fd0911c28c93a4bc6fd5 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-19/+11
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - 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 Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-6/+6
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Support smooth for AnimatedSpriteGunnar Sletta2014-05-141-1/+1
| | | | | | Task-number: QTBUG-38923 Change-Id: I1cb9ac434aa729ee390e17deced9ed470895549d Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix AnimatedSprite interpolation when looping and/or reversing.Michael Brasser2014-03-171-11/+47
| | | | | | | | | | Ensure we interpolate in the correct direction, and that interpolation occurs between loops. Task-number: QTBUG-36339 Task-number: QTBUG-36340 Change-Id: Iccb097e6a9af9fa6697e2ba9ee852be9eb516edc Reviewed-by: Jan Arve Sæther <jan-arve.saether@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-311-37/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* Remove superfluous code.Gunnar Sletta2013-10-291-12/+0
| | | | | | | | | | I suspect this was to work around that a very early version of the previous renderer some times left vertex pointers active, but this has not been the case for a very long time, so this code is just wasting time and memory. Change-Id: I4b79ff67d17bf47af515e8db203960c9bceae247 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Don't use reserved keyword "texture" as uniform variable nameSean Harmer2013-10-211-2/+2
| | | | | | | | | | 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-021-19/+19
| | | | | | | | | | 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>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-251-1/+1
| | | | | | | | | | | -incremented version to Qt Quick 2.2 (in \qmlmodule page) -import changed to QtQuick 2.2 -\inqmlmodule no longer needs the version. QDoc will ignore the version but it is better to remove it now to avoid confusion Task-number: QTBUG-32172 Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* emit runningChanged when AnimatedSprite stops by loops settingsTasuku Suzuki2013-06-221-3/+4
| | | | | | Task-number: QTBUG-31522 Change-Id: I20718cda5f77f3a53176c8b1a4baacedd77375af Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix remote image loading for AnimatedSpriteAlan Alpert2013-03-121-2/+2
| | | | | | | | | The Sprite generated behind the scenes had no QmlEngine associated, and the engine is needed by QQuickPixmap for async loading. Task-number: QTBUG-28086 Change-Id: Ibf3b03c54b339fe8f44201dc6fcb507e5274bbec Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* doc: fix some typos in .cpp filesSergio Ahumada2012-09-071-1/+1
| | | | | Change-Id: Ica7685aefde84ec80d8af7a67541af454de4adce Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Document some undocumented AnimatedSprite functionsBea Lam2012-08-091-0/+27
| | | | | Change-Id: If6ac34a989d5770b1f3e2481a01ee57ad89f7707 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-301-1/+2
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-2/+2
| | | | | | | | | | | | | | | | QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-1/+1
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Create new documentation structureChris Adams2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | The documentation currently has no clear separation between Qt QML and Qt Quick. With recent commits like: 6c8378eaf1edbbefe6aaa3672b0127816a004fd7 and ab1e510121c8a679fdaca12ccd30e0f7ac12a26b the separation between the language definition and implementation, provided by Qt QML, and the standard library for the QML language, provided by Qt Quick, is clear. This commit creates a new documentation structure that is more navigable and separates concepts into logical categories, with clear separation between QtQML and QtQuick. It also provides a more generic QML Application Developer Resources page which contains links to information for QML application developers. Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't start running if a frame property is setAlan Alpert2012-06-201-4/+5
| | | | | | | | | | | | This fixes an error where running couldn't be reliably set, if a frame property was also being set during initialization. With this fixed, the autotest is no longer unstable. Also fixed is a related issue where start/stop/restart were active before componentComplete. Change-Id: I34c6d872f2f146d38c65167eda8c0a97525d7f4e Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Emit currentFrameChanged signal when neededAlan Alpert2012-06-121-0/+9
| | | | | | | Task-number: QTBUG-25039 Change-Id: I8bd5fd40a5fee1314f0401ed4708d73ed1cfad94 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Use the texture coordinates provided by QSGTextureAlan Alpert2012-06-051-8/+9
| | | | | | Change-Id: I24e377ba69b2108f3bc4f6aca3ed910fbbf77caf Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Doc: Sanitized QML typesNico Vertriest2012-05-241-1/+1
| | | | | | | | | | -modified \brief -checked QML modules -added qml directory to the qdocconf file -added particles directory to the qdocconf file Change-Id: I589e32d3106cda37c7fa4d55a941afd9876fc2b2 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* QtDeclarative: Fix warnings about uninitialized variables.Friedemann Kleint2012-05-211-1/+1
| | | | | Change-Id: Ie918f1e813b243b250cedfc2e94e9c66288d08e3 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Calculate vertex positions on CPUAlan Alpert2012-05-141-16/+34
| | | | | | | | Easier for SG to optimize with, not really gaining anything putting it on the GPU for these Elements. Change-Id: I239e70dafce441f5281ded185de63bc1afd7d85a Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Flesh out the sprite documentationAlan Alpert2012-05-141-0/+8
| | | | | | | Task-number: QTBUG-24770 Change-Id: I40c46aa29ffdcc5899bece46c4b6227ca29695cd Reviewed-by: Martin Jones <martin.jones@nokia.com>
* AnimatedSprite framespeed properties now restart animation.Alan Alpert2012-05-111-3/+15
| | | | | | | | | | For a simple element, we're taking the simple solution for the interaction of changing these parameters during an animation. Task-number: QTBUG-25045 Task-number: QTBUG-25043 Change-Id: I1fb37fc029f23ce92558cb2e5deed80a69784173 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove QSGEngineGunnar Sletta2012-05-031-1/+0
| | | | | Change-Id: Iaab0d9f607b1f4ca6dfb13495a456d1b31bb980a Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-4/+4
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Add AnimatedSpriteAlan Alpert2012-02-281-0/+613
A simpler sprite image element for the simple usecase. Because sometimes an engine with stochastic capabilities is overkill. Change-Id: I2b76c5d417719e92a548f6266bffd563dc016983 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>