diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-17 19:34:59 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-17 19:34:59 (GMT) |
commit | e920c83084b48db7fe1925c7b98e34794eec6d55 (patch) | |
tree | ee62cb31e14a72488767071072a35fce552e6e9a /src/gui/graphicsview/qgraphicsitem_p.h | |
parent | 08c80cc1bc50f9f2990f0fc459f09d2b554bce08 (diff) | |
download | Qt-e920c83084b48db7fe1925c7b98e34794eec6d55.zip Qt-e920c83084b48db7fe1925c7b98e34794eec6d55.tar.gz Qt-e920c83084b48db7fe1925c7b98e34794eec6d55.tar.bz2 |
Speedup QGraphicsScenePrivate::processDirtyItemsRecursive
Avoid QTransform copy in common case.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index ce74b4f..b7fb122 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -55,6 +55,7 @@ #include "qgraphicsitem.h" #include "qpixmapcache.h" +#include "qgraphicsview_p.h" #include <QtCore/qpoint.h> @@ -365,6 +366,14 @@ public: || (childrenCombineOpacity() && isFullyTransparent()); } + inline bool updateHelper(QGraphicsViewPrivate *view, const QRectF &rect, const QTransform &xform) const + { + Q_ASSERT(view); + if (hasBoundingRegionGranularity) + return view->updateRegion(xform.map(QRegion(rect.toRect()))); + return view->updateRect(xform.mapRect(rect).toRect()); + } + inline QTransform transformToParent() const; QPainterPath cachedClipPath; |