summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h8
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp18
2 files changed, 14 insertions, 12 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index b7fb122..b9e7041 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -366,14 +366,6 @@ 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;
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 15e8742..d9d31ef 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -5306,6 +5306,16 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
}
}
+static inline bool updateHelper(QGraphicsViewPrivate *view, QGraphicsItemPrivate *item,
+ const QRectF &rect, const QTransform &xform)
+{
+ Q_ASSERT(view);
+ Q_ASSERT(item);
+ if (item->hasBoundingRegionGranularity)
+ return view->updateRegion(xform.map(QRegion(rect.toRect())));
+ return view->updateRect(xform.mapRect(rect).toRect());
+}
+
void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool dirtyAncestorContainsChildren,
qreal parentOpacity)
{
@@ -5401,14 +5411,14 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
bool valid = false;
if (untransformableItem) {
- valid = item->d_ptr->updateHelper(viewPrivate, dirtyRect,
- item->deviceTransform(view->viewportTransform()));
+ valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect,
+ item->deviceTransform(view->viewportTransform()));
} else if (!view->isTransformed()) {
- valid = item->d_ptr->updateHelper(viewPrivate, dirtyRect, item->d_ptr->sceneTransform);
+ valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, item->d_ptr->sceneTransform);
} else {
QTransform deviceTransform = item->d_ptr->sceneTransform;
deviceTransform *= view->viewportTransform();
- valid = item->d_ptr->updateHelper(viewPrivate, dirtyRect, deviceTransform);
+ valid = updateHelper(viewPrivate, item->d_ptr, dirtyRect, deviceTransform);
}
if (!valid)
paintedViewBoundingRect = QRect();