diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-04-28 09:13:06 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-02 07:19:48 +0200 |
commit | 4633c2681c5b4ce7c6d57c42c01e7843c7836720 (patch) | |
tree | 0848a7198090e849d7be1d110b9ec50cfcf05bfb /src/declarative/items/qsgcanvas.cpp | |
parent | 6f6898e775520efe34094af062ddd62b1baaba36 (diff) |
Added a runtime option to enable consistent timing for animations
Diffstat (limited to 'src/declarative/items/qsgcanvas.cpp')
-rw-r--r-- | src/declarative/items/qsgcanvas.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 5fc5c76d1d..5d5c49d981 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -48,6 +48,8 @@ #include <private/qsgrenderer_p.h> #include <private/qsgflashnode_p.h> +#include <private/qabstractanimation_p.h> + #include <QtGui/qpainter.h> #include <QtGui/qgraphicssceneevent.h> #include <QtGui/qmatrix4x4.h> @@ -60,6 +62,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlThreadedRenderer, QML_THREADED_RENDERER) +DEFINE_BOOL_CONFIG_OPTION(qmlFixedAnimationStep, QML_FIXED_ANIMATION_STEP) /* Focus behavior @@ -332,8 +335,8 @@ void QSGCanvasPrivate::renderSceneGraph() #ifdef FRAME_TIMING - int pixel; - glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); +// int pixel; +// glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); readbackTime = frameTimer.elapsed(); #endif @@ -477,6 +480,8 @@ QSGCanvasPrivate::~QSGCanvasPrivate() void QSGCanvasPrivate::init(QSGCanvas *c) { + QUnifiedTimer::instance(true)->setConsistentTiming(qmlFixedAnimationStep()); + q_ptr = c; Q_Q(QSGCanvas); |