diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-04-07 05:52:12 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-04-07 05:52:12 (GMT) |
commit | fd4a62bfc18006b3c29918a65b60d9bacf22c9c0 (patch) | |
tree | 1abb22ff8060d0876ee3a368a39b78b70aed22f7 /src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | |
parent | 3923604b4390e613000f4c2b00db9e0a954f92ed (diff) | |
download | Qt-fd4a62bfc18006b3c29918a65b60d9bacf22c9c0.zip Qt-fd4a62bfc18006b3c29918a65b60d9bacf22c9c0.tar.gz Qt-fd4a62bfc18006b3c29918a65b60d9bacf22c9c0.tar.bz2 |
Call ReleaseSource where appropriate
DirectFB caches the last source surface in the target surface after a
Blit. This can cause a surface to be kept around longer than desired
since the caching increases the ref-count. Unless it's likely that the
blit will happen again soon we Release the source.
Reviewed-by: TrustMe
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 45f0710..c4144bd 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -132,6 +132,7 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) const DFBRectangle blitRect = { rect.x(), rect.y(), rect.width(), rect.height() }; DFBResult result = dfbSurface->Blit(dfbSurface, src, &blitRect, 0, 0); + dfbSurface->ReleaseSource(dfbSurface); if (result != DFB_OK) { DirectFBError("QDirectFBPixmapData::copy()", result); setSerialNumber(0); @@ -236,6 +237,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, const DFBRectangle destRect = { 0, 0, size.width(), size.height() }; data->dfbSurface->StretchBlit(data->dfbSurface, dfbSurface, 0, &destRect); + data->dfbSurface->ReleaseSource(data->dfbSurface); return QPixmap(data); } |