summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-09-30 18:07:55 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-10-01 00:03:39 (GMT)
commita73213cf5acdaabcd61245a6882e608b2337da3c (patch)
tree6ff7e89fb4a6a78809ce35221f4fde1e82e0071f /src/plugins
parente8fc662c4b5a0fa5da6f0d47e1dbb5b2640d7001 (diff)
downloadQt-a73213cf5acdaabcd61245a6882e608b2337da3c.zip
Qt-a73213cf5acdaabcd61245a6882e608b2337da3c.tar.gz
Qt-a73213cf5acdaabcd61245a6882e608b2337da3c.tar.bz2
Clean up releaseSurface in QDirectFBPaintDevice
Instead of having to call unlockSurface/releaseSubSurface and releaseSurface to release the surface in QDirectFBWindowSurface make releaseSurface do all three things. Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp11
2 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
index 46cf65b..cb4fb88 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp
@@ -209,6 +209,7 @@ void QDirectFBPaintDevice::releaseSubSurface()
{
Q_ASSERT(QDirectFBScreen::instance());
if (subSurface) {
+ unlockSurface();
screen->releaseDFBSurface(subSurface);
subSurface = 0;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 19103cb..51afcc7 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -200,10 +200,6 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect)
if (sizeChanged) {
delete engine;
engine = 0;
- unlockSurface();
-#ifdef QT_DIRECTFB_SUBSURFACE
- releaseSubSurface();
-#endif
releaseSurface();
Q_ASSERT(!dfbSurface);
}
@@ -430,9 +426,10 @@ void QDirectFBWindowSurface::updateFormat()
void QDirectFBWindowSurface::releaseSurface()
{
if (dfbSurface) {
-#ifdef QT_NO_DIRECTFB_SUBSURFACE
- if (lockFlgs)
- unlockSurface();
+#ifdef QT_DIRECTFB_SUBSURFACE
+ releaseSubSurface();
+#else
+ unlockSurface();
#endif
#ifdef QT_NO_DIRECTFB_WM
Q_ASSERT(screen->primarySurface());