summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-07-22 11:20:32 -0700
committerAnders Bakken <anders.bakken@nokia.com>2009-07-22 11:20:32 -0700
commitd79f61b51868712590f423483f4d3b39cb60aa64 (patch)
treea4cef0745918348fa3f3bc8dd7d409ff41cab089 /src/plugins
parenteb6fa7e03a5c91e3da93d0c6203d9bad52dfcbb9 (diff)
Fix IDirectFBSurface::ReleaseSource calls
Make sure that these calls are in the right order. Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 94f1aeb267..68f37ff4f8 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -466,7 +466,7 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image,
d->blit(r, imgSurface, sr);
if (release) {
#if (Q_DIRECTFB_VERSION >= 0x010000)
- imgSurface->ReleaseSource(imgSurface);
+ d->surface->ReleaseSource(d->surface);
#endif
imgSurface->Release(imgSurface);
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 88e304cf03..e12cbc40c8 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -141,6 +141,7 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QImage &img, SurfaceCr
{
if (img.isNull()) // assert?
return 0;
+
if (QDirectFBScreen::getSurfacePixelFormat(img.format()) == DSPF_UNKNOWN) {
QImage image = img.convertToFormat(img.hasAlphaChannel()
? d_ptr->alphaPixmapFormat
@@ -321,10 +322,10 @@ IDirectFBSurface *QDirectFBScreen::copyToDFBSurface(const QImage &img,
DFBResult result = dfbSurface->Blit(dfbSurface, imgSurface, 0, 0, 0);
if (result != DFB_OK)
DirectFBError("QDirectFBScreen::copyToDFBSurface()", result);
+ imgSurface->Release(imgSurface);
#if (Q_DIRECTFB_VERSION >= 0x010000)
dfbSurface->ReleaseSource(dfbSurface);
#endif
- imgSurface->Release(imgSurface);
#else // QT_NO_DIRECTFB_PREALLOCATED
Q_ASSERT(image.format() == pixmapFormat);
int bpl;