summaryrefslogtreecommitdiffstats
path: root/src/gui/effects/qgraphicseffect_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-10-30 12:37:05 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-11-02 11:57:54 (GMT)
commit85e41590732f15cec16909bf1121d944ae684373 (patch)
tree66d88bfcc51803f92749a8d5bcd0017857a7cbd5 /src/gui/effects/qgraphicseffect_p.h
parent17cda5c55273813cbedcced3a511f1c222978182 (diff)
downloadQt-85e41590732f15cec16909bf1121d944ae684373.zip
Qt-85e41590732f15cec16909bf1121d944ae684373.tar.gz
Qt-85e41590732f15cec16909bf1121d944ae684373.tar.bz2
Optimized graphics effects to not needlessly invalidate cache.
When the effect rect changes we only need to invalidate the cache if the mode is ExpandToEffectRectPadMode. Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/gui/effects/qgraphicseffect_p.h')
-rw-r--r--src/gui/effects/qgraphicseffect_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 1ed7103..0ff5794 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -85,7 +85,7 @@ public:
virtual QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset = 0,
QGraphicsEffectSource::PixmapPadMode mode = QGraphicsEffectSource::ExpandToTransparentBorderPadMode) const = 0;
virtual void effectBoundingRectChanged() = 0;
- void invalidateCache() const { QPixmapCache::remove(m_cacheKey); }
+ void invalidateCache(bool effectRectChanged = false) const;
friend class QGraphicsScenePrivate;
friend class QGraphicsItem;