From 0b3f46014764d6e35da321bbba2d0232ec99d1b1 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 24 May 2012 15:51:27 +0200 Subject: Uses new batching API to potentially speed up glyph cache Give the cache information that a burst of requests/releases are coming, so it can potentially optimize this. Change-Id: Icfb591a63075c2f1e93bf269402649116de9e5be Reviewed-by: Jiang Jiang --- src/quick/items/qquickcanvas.cpp | 8 ++++++++ src/quick/items/qquickcanvas.h | 1 + 2 files changed, 9 insertions(+) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index 248195127f..08f9b4423f 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -282,6 +282,9 @@ void forceUpdate(QQuickItem *item) void QQuickCanvasPrivate::syncSceneGraph() { QML_MEMORY_SCOPE_STRING("SceneGraph"); + Q_Q(QQuickCanvas); + + emit q->beforeSynchronizing(); if (!renderer) { forceUpdate(rootItem); @@ -787,6 +790,11 @@ void QQuickCanvasPrivate::cleanup(QSGNode *n) \list + \li The QQuickCanvas::beforeSynchronizing() signal is emitted. + Applications can make direct connections (Qt::DirectConnection) + to this signal to do any preparation required before calls to + QQuickItem::updatePaintNode(). + \li Synchronzation of the QML state into the scene graph. This is done by calling the QQuickItem::updatePaintNode() function on all items that have changed since the previous frame. When a dedicated diff --git a/src/quick/items/qquickcanvas.h b/src/quick/items/qquickcanvas.h index c3a6e45eba..1d23996b91 100644 --- a/src/quick/items/qquickcanvas.h +++ b/src/quick/items/qquickcanvas.h @@ -125,6 +125,7 @@ Q_SIGNALS: void frameSwapped(); void sceneGraphInitialized(); void sceneGraphInvalidated(); + void beforeSynchronizing(); void beforeRendering(); void afterRendering(); void clearColorChanged(const QColor &); -- cgit v1.2.3