summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index cce9439..77e4054 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -300,10 +300,10 @@ public:
QDeclarativeListProperty<QGraphicsObject> childrenList();
void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant,
const QVariant *thisPointerVariant);
- void childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip = true);
+ void childrenBoundingRectHelper(QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem);
void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
const QRegion &exposedRegion, bool allItems = false) const;
- QRectF effectiveBoundingRect() const;
+ QRectF effectiveBoundingRect(QGraphicsItem *topMostEffectItem = 0) const;
QRectF sceneEffectiveBoundingRect() const;
QRectF effectiveBoundingRect(const QRectF &rect) const;
@@ -661,7 +661,7 @@ class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
QGraphicsItemEffectSourcePrivate(QGraphicsItem *i)
- : QGraphicsEffectSourcePrivate(), dirtyChildrenBoundingRect(true), item(i), info(0)
+ : QGraphicsEffectSourcePrivate(), item(i), info(0)
{}
inline void detach()
@@ -712,9 +712,6 @@ public:
QGraphicsEffect::PixmapPadMode mode) const;
QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const;
- mutable bool dirtyChildrenBoundingRect;
- mutable QRectF childrenBoundingRect;
-
QGraphicsItem *item;
QGraphicsItemPaintInfo *info;
QTransform lastEffectTransform;
@@ -872,12 +869,9 @@ inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
#ifndef QT_NO_GRAPHICSEFFECT
if (parentp->graphicsEffect) {
if (updateBoundingRect) {
- QGraphicsItemEffectSourcePrivate *sourcep =
- static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
- ->source->d_func());
- parentp->dirtyChildrenBoundingRect = 1;
+ static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
+ ->source->d_func())->invalidateCache();
parentp->notifyInvalidated = 1;
- sourcep->invalidateCache();
}
if (parentp->scene && parentp->graphicsEffect->isEnabled()) {
parentp->dirty = 1;