diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-05-28 18:16:20 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:29:21 (GMT) |
commit | 32c09e7a36ecd41e8beb2a1f947944502793fd84 (patch) | |
tree | 147a547cdeff21d075231ac853132403e02ac152 /src/gui/graphicsview/qgraphicsscene_p.h | |
parent | aba52a08d8868682e576d1b53d423cedb0a9134e (diff) | |
download | Qt-32c09e7a36ecd41e8beb2a1f947944502793fd84.zip Qt-32c09e7a36ecd41e8beb2a1f947944502793fd84.tar.gz Qt-32c09e7a36ecd41e8beb2a1f947944502793fd84.tar.bz2 |
More re-factoring of Graphics View's update mechanism.
This time with a recursive approach of processing dirty items. I've kept
the previous approach using a dirty list, but the recursive one is now
the default. Use QT_GV_USE_DIRTY_LIST=1 to swap.
I've also cached the item's device transform in both cases so that we
can re-use it later when drawing the item.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index bf7ac0a..50c716c 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -105,6 +105,7 @@ public: QList<QRectF> updatedRects; bool updateAll; bool calledEmitUpdated; + bool processDirtyItemsEmitted; QPainterPath selectionArea; int selectionChanging; @@ -257,6 +258,7 @@ public: const QRegion &exposedRegion, QWidget *widget, QGraphicsView::OptimizationFlags optimizationFlags); void markDirty(QGraphicsItem *item, const QRectF &rect = QRectF(), bool invalidateChildren = false, bool maybeDirtyClipPath = false, bool force = false, bool ignoreOpacity = false); + void processDirtyItemsRecursive(QGraphicsItem *item, const QTransform &); inline void resetDirtyItem(QGraphicsItem *item) { @@ -266,6 +268,8 @@ public: item->d_ptr->dirtyChildren = 0; item->d_ptr->inDirtyList = 0; item->d_ptr->needsRepaint = QRectF(); + item->d_ptr->allChildrenDirty = 0; + item->d_ptr->fullUpdatePending = 0; } inline void removeFromDirtyItems(QGraphicsItem *item) |