diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-03-11 16:24:41 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-04-06 11:49:41 (GMT) |
commit | 4556bcbd40c8feb7185aae7da5f0686f12d87565 (patch) | |
tree | f4be3dda7b316818201e002bde409988d357af1c /src/gui/graphicsview/qgraphicsitem_p.h | |
parent | 0985805ab3c7de5b15c115a98afb15944b6d93b9 (diff) | |
download | Qt-4556bcbd40c8feb7185aae7da5f0686f12d87565.zip Qt-4556bcbd40c8feb7185aae7da5f0686f12d87565.tar.gz Qt-4556bcbd40c8feb7185aae7da5f0686f12d87565.tar.bz2 |
Fixes: Optimization: Cache QGraphicsItem::clipPath().
RevBy: Alexis
AutoTest: Still pass
Details: No-brainer.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 7deae52..1e2c09b 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -138,6 +138,7 @@ public: dirty(0), dirtyChildren(0), localCollisionHack(0), + dirtyClipPath(1), globalStackingOrder(-1), sceneTransformIndex(-1), q_ptr(0) @@ -234,6 +235,18 @@ public: QGraphicsItemCache *extraItemCache() const; void removeExtraItemCache(); + inline void setCachedClipPath(const QPainterPath &path) + { + cachedClipPath = path; + dirtyClipPath = 0; + } + + inline void invalidateCachedClipPath() + { dirtyClipPath = 1; } + + void invalidateCachedClipPathRecursively(bool childrenOnly = false); + + QPainterPath cachedClipPath; QPointF pos; qreal z; QGraphicsScene *scene; @@ -268,6 +281,7 @@ public: quint32 dirty : 1; quint32 dirtyChildren : 1; quint32 localCollisionHack : 1; + quint32 dirtyClipPath : 1; // Optional stacking order int globalStackingOrder; |