aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d/qquickcanvasitem_p.h
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2017-02-02 14:22:08 +0100
committerAndy Nichols <andy.nichols@qt.io>2017-02-02 19:21:04 +0000
commitb0ced704bcaeb6dc71622c9ce87b78f3b5bd827c (patch)
tree1421b02886adb251f81a72b2c0de65f5aa9c31fc /src/quick/items/context2d/qquickcanvasitem_p.h
parentf96b77bf46a29b1c09d6ebff2f18a475c7ca0b2f (diff)
Canvas Item: Prevent polish loop when calling requestAnimationFrame
Currently if you call requestAnimationFrame within the callback given by requestAnimationFrame there is a polish loop. This is however the common way when using Canvas2D in the browser to get screen refresh rate animations. This patch makes sure that polish won't be called when processing polish items by calling polish indirectly. Task-number: QTBUG-55778 Change-Id: Ib96e39f7ca3cecc33609976e9049cc309768f9f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/items/context2d/qquickcanvasitem_p.h')
-rw-r--r--src/quick/items/context2d/qquickcanvasitem_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h
index 8af84d0e7c..217ae9bb69 100644
--- a/src/quick/items/context2d/qquickcanvasitem_p.h
+++ b/src/quick/items/context2d/qquickcanvasitem_p.h
@@ -182,6 +182,7 @@ private Q_SLOTS:
void sceneGraphInitialized();
void checkAnimationCallbacks();
void invalidateSceneGraph();
+ void schedulePolish();
protected:
void componentComplete() Q_DECL_OVERRIDE;
@@ -190,6 +191,7 @@ protected:
QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
void releaseResources() Q_DECL_OVERRIDE;
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QQuickCanvasItem)
Q_INVOKABLE void delayedCreate();