summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicssceneindex_p.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-07 16:05:51 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-08 15:28:50 (GMT)
commit8ca44447283deb333591c6354f16f01f30d74e21 (patch)
tree12767f4803fd268cd77c4ac7fb9169d6fef0d9e6 /src/gui/graphicsview/qgraphicssceneindex_p.h
parent1336f8268512a4ad29732acf75f2e6c4d41683ce (diff)
downloadQt-8ca44447283deb333591c6354f16f01f30d74e21.zip
Qt-8ca44447283deb333591c6354f16f01f30d74e21.tar.gz
Qt-8ca44447283deb333591c6354f16f01f30d74e21.tar.bz2
Reduce QTransform operations in QGraphicsSceneIndex.
Update the scene transform and use it directly in the same fashion as we do in processDirtyItemsRecursive/drawSubtreeRecursive. All auto-tests pass
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneindex_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex_p.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h
index 6521765..8cf0294 100644
--- a/src/gui/graphicsview/qgraphicssceneindex_p.h
+++ b/src/gui/graphicsview/qgraphicssceneindex_p.h
@@ -137,7 +137,7 @@ public:
void recursive_items_helper(QGraphicsItem *item, QRectF exposeRect,
QGraphicsSceneIndexIntersector *intersector, QList<QGraphicsItem *> *items,
- const QTransform &parentTransform, const QTransform &viewTransform,
+ const QTransform &viewTransform,
Qt::ItemSelectionMode mode, Qt::SortOrder order, qreal parentOpacity = 1.0) const;
inline void items_helper(const QRectF &rect, QGraphicsSceneIndexIntersector *intersector,
QList<QGraphicsItem *> *items, const QTransform &viewTransform,
@@ -155,9 +155,8 @@ inline void QGraphicsSceneIndexPrivate::items_helper(const QRectF &rect, QGraphi
{
Q_Q(const QGraphicsSceneIndex);
const QList<QGraphicsItem *> tli = q->estimateTopLevelItems(rect, Qt::DescendingOrder);
- const QTransform identity;
for (int i = 0; i < tli.size(); ++i)
- recursive_items_helper(tli.at(i), rect, intersector, items, identity, viewTransform, mode, order);
+ recursive_items_helper(tli.at(i), rect, intersector, items, viewTransform, mode, order);
if (order == Qt::AscendingOrder) {
const int n = items->size();
for (int i = 0; i < n / 2; ++i)
@@ -171,7 +170,7 @@ public:
QGraphicsSceneIndexIntersector() { }
virtual ~QGraphicsSceneIndexIntersector() { }
virtual bool intersect(const QGraphicsItem *item, const QRectF &exposeRect, Qt::ItemSelectionMode mode,
- const QTransform &transform, const QTransform &deviceTransform) const = 0;
+ const QTransform &deviceTransform) const = 0;
};
#endif // QT_NO_GRAPHICSVIEW