diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-10-30 12:37:05 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-11-02 11:57:54 (GMT) |
commit | 85e41590732f15cec16909bf1121d944ae684373 (patch) | |
tree | 66d88bfcc51803f92749a8d5bcd0017857a7cbd5 /src/gui/effects/qgraphicseffect_p.h | |
parent | 17cda5c55273813cbedcced3a511f1c222978182 (diff) | |
download | Qt-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.h | 2 |
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; |