diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-10-16 07:55:28 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-10-22 16:44:05 (GMT) |
commit | 5de213210ef4f14e698c3fd970cf7e6c5b27c72d (patch) | |
tree | da5d692ff2dec2ed835cc698ee7770d93351830d /src/gui/painting/qbackingstore.cpp | |
parent | a392366b164081fe3b75c806dbf2030e64754eaf (diff) | |
download | Qt-5de213210ef4f14e698c3fd970cf7e6c5b27c72d.zip Qt-5de213210ef4f14e698c3fd970cf7e6c5b27c72d.tar.gz Qt-5de213210ef4f14e698c3fd970cf7e6c5b27c72d.tar.bz2 |
Added caching of graphics effect source pixmaps to speed up effects.
If an effect is applied repeatedly on the same source, just with
varying parameters, we can save a lot by caching the source pixmaps.
Reviewed-by: Bjørn Erik Nilsen
Diffstat (limited to 'src/gui/painting/qbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 7c07df8..3cd1402 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -56,6 +56,7 @@ #include <private/qwindowsurface_raster_p.h> #include <private/qapplication_p.h> #include <private/qpaintengine_raster_p.h> +#include <private/qgraphicseffect_p.h> #include "qgraphicssystem_p.h" @@ -540,6 +541,8 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up Q_ASSERT(widget->window() == tlw); Q_ASSERT(!rgn.isEmpty()); + widget->d_func()->invalidateGraphicsEffectsRecursively(); + if (widget->d_func()->paintOnScreen()) { if (widget->d_func()->dirty.isEmpty()) { widget->d_func()->dirty = rgn; @@ -615,6 +618,8 @@ void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool upd Q_ASSERT(widget->window() == tlw); Q_ASSERT(!rect.isEmpty()); + widget->d_func()->invalidateGraphicsEffectsRecursively(); + if (widget->d_func()->paintOnScreen()) { if (widget->d_func()->dirty.isEmpty()) { widget->d_func()->dirty = QRegion(rect); |