summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
Commit message (Collapse)AuthorAgeFilesLines
* Avoid advancing animations outside the animation "tick"Gunnar Sletta2012-02-093-2/+9
| | | | | | | | | | | | | | | We have logic to prevent animations from starting in the middle of an animation as a result of a previously slow frame. This was based on current time, not the animation driver time and would cause severe jumping when custom animation drivers were being used. Also, this logic would trigger multiple animation runs per frame, which is very bad for performance, so this change introduces a threshold of 50ms to compensate for that. 50ms because that is triplebuffer limit. Change-Id: I1c7ebac30060e849d03c14d62411c2b953854d98 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-4/+0
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3020-20/+20
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-257-7/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QPropertyAnimation::setTargetObject() fails if new and old target object ↵Armin Berres2012-01-231-1/+1
| | | | | | | | | | | | | | | | | | | have the same address If a target object is destroyed QPropertyAnimationPrivate::targetValue reflects this while QPropertyAnimationPrivate::target stays unchanged. QPropertyAnimation::setTargetObject() checks if a new target matches QPropertyAnimationPrivate::target - to bad if the former target has been destroyed in the meanwhile but the new one has the same memory address. targetValue is not updated in this case. It will still point to null and QPropertyAnimation::targetObject() returns 0. This is not just a theoretical problem - we stubled upon this in Harmattan when suddenly animations complained that they are having no target. Change-Id: Ib4a9c234d04d6f8a3f7aed251d5e79471d95168a Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Update contact information in license headers.Jason McDonald2012-01-2320-20/+20
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Abstract QUnifiedTimer.Michael Brasser2012-01-122-130/+414
| | | | | | | | | | | | | QUnifiedTimer now controls QAbstractAnimationTimers, which in turn can be used to drive specific animation systems. The purpose of this change is to allow the QML animation system to be rewritten so that it does not depend on QAbstractAnimation. Change-Id: If06475002e41ba85b1b86b5dd4788de6d27d035d Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Use explicit Qt::TimerTypes when starting animation timers.Bradley T. Hughes2012-01-051-2/+6
| | | | | | | | | | | | | | | Similar to commit 4e1ad49998cf782ccc88e7e80fbd05c722658a16, we know that CoarseTimers are worst in their first firing, so we prefer a PreciseTimer for short pause animations to avoid inaccuracies. If the timeout is too big, we use a CoarseTimer anyway (current threshold is 2000ms). The timer that drives the QDefaultAnimationDriver is always a PreciseTimer. Change-Id: I0939357d768b804f9f9bab3adf5ed1d0f7e012e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0520-20/+20
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix possible jump in animation timer.Michael Brasser2011-12-141-0/+4
| | | | | | | | | | | | When starting new animations with existing animations running, ensure we force an update to the timer first, so that the new animations can't mistakenly start with a very large delta. This fixes tst_qdeclarativeanimations::alwaysRunToEndRestartBug failure on slow machines. Change-Id: Ida4e5dcf0ff792e6bfe0d244b6e969d04d0b20fa Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Stop animation driver in the appropriate place.Michael Brasser2011-12-131-2/+2
| | | | | | | | | Calling stop from restartAnimationTimer was incorrect (it was initially added as a fix after the introduction of QAnimationDriver, but this is a better location for the fix). Change-Id: I2507096b846ada061e36a9ece6aa814d801ddd53 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Only call profiler callback once per animation tick.Michael Brasser2011-12-131-3/+2
| | | | | Change-Id: I369afdf34ded2c6327ce36cdb80fab51bf89a1b5 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Cleanup pause timer handling in QUnifiedTimer.Michael Brasser2011-12-132-15/+11
| | | | | | | | | The animationTimer is now only used for pauses, so can be renamed to pauseTimer, and directly queried for whether it is active. Change-Id: I3d9319b6ee76158e875ab43657126a0aa0a1cf2e Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix possible jump in animation timer.Michael Brasser2011-12-132-24/+47
| | | | | | | | | | | | If both a stop and start happen within an event loop, ensure they are processed in order. Based on a patch from Charles Yin. Task-number: QTBUG-22865 Change-Id: I6131bd43a6ba5ad4fa37c863a9f4598bf2ac0e01 Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fixed QUnifiedTimer cleanup.Kim Motoyoshi Kalland2011-11-281-2/+2
| | | | | | | | | | When destroying QUnifiedTimer's instance, its default animation driver is destroyed as well. This patch avoids creating another QUnifiedTimer instance when the animation driver's destructor calls QUnifiedTimer::instance(). Change-Id: I9cf254a9d04d79447baa8f27625c3890c3645f08 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* QUnifiedTimer: Add callback for timer ticks. Used for profilingChristiaan Janssen2011-10-102-1/+12
| | | | | | | | Change-Id: Ia7cf823dee7f0b491db2f041d29cdfc0e385f18e Reviewed-on: http://codereview.qt-project.org/6253 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make all uses of QBasicAtomicInt and Pointer use load() and store()Thiago Macieira2011-10-031-2/+2
| | | | | | | | | | | | | | Most of these changes are search-and-replace of d->ref ==, d->ref != and d->ref =. The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to be basic, so I made it QAtomicPointer. Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6 Reviewed-on: http://codereview.qt-project.org/5030 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-2420-340/+340
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Fix QDefaultAnimationDriverAlan Alpert2011-05-102-4/+7
| | | | | | | Animation drivers were changed to used signals instead of virtual functions, but the default animation driver was left behind. Reviewed-by: Michael Brasser
* Make it possible for animation driver to specify the advance time deltaGunnar Sletta2011-05-043-23/+61
|
* Initial import from qtquick2.Qt by Nokia2011-04-273-5/+59
| | | | | Branched from the monolithic repo, Qt qtquick2 branch, at commit a4a585d2ee907746682846ae6e8a48e19deef469
* Initial import from the monolithic Qt.Qt by Nokia2011-04-2721-0/+4985
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12