diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-07-27 14:44:27 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-07-28 14:17:45 (GMT) |
commit | f4978a5894212dd655a91dbb0db02a89070bb165 (patch) | |
tree | 2028648f9304274e21a4ee73f7d16cde7855b462 /src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | |
parent | 8e9921c43ae0b896aee091e1031b4f42c332332b (diff) | |
download | Qt-f4978a5894212dd655a91dbb0db02a89070bb165.zip Qt-f4978a5894212dd655a91dbb0db02a89070bb165.tar.gz Qt-f4978a5894212dd655a91dbb0db02a89070bb165.tar.bz2 |
Refactor QImage/QPixmap cleanup hooks into a seperate class
The new class alows more than one hook to be installed at a time and,
for QPixmaps, the hook is told which pixmap is getting deleted.
Reviewed-By: Samuel
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index b264ac0..2ed890b 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -53,6 +53,7 @@ #include <qmath.h> #include <private/qpixmapdata_p.h> #include <private/qpixmap_raster_p.h> +#include <private/qimagepixmapcleanuphooks_p.h> class SurfaceCache; class QDirectFBPaintEnginePrivate : public QRasterPaintEnginePrivate @@ -699,9 +700,7 @@ void QDirectFBPaintEngine::initImageCache(int size) { Q_ASSERT(size >= 0); imageCache.setMaxCost(size); - typedef void (*_qt_image_cleanup_hook_64)(qint64); - extern Q_GUI_EXPORT _qt_image_cleanup_hook_64 qt_image_cleanup_hook_64; - qt_image_cleanup_hook_64 = ::cachedImageCleanupHook; + QImagePixmapCleanupHooks::instance()->addImageHook(cachedImageCleanupHook); } #endif // QT_DIRECTFB_IMAGECACHE |