diff options
Diffstat (limited to 'src/plugins/gfxdrivers')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp | 16 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h | 1 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp index e74bd89..b82433d 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp @@ -59,13 +59,10 @@ QDirectFBPaintDevice::QDirectFBPaintDevice(QDirectFBScreen *scr) QDirectFBPaintDevice::~QDirectFBPaintDevice() { - unlockSurface(); if (QDirectFBScreen::instance()) { unlockSurface(); #ifdef QT_DIRECTFB_SUBSURFACE - if (subSurface) { - screen->releaseDFBSurface(subSurface); - } + releaseSubSurface(); #endif if (dfbSurface) { screen->releaseDFBSurface(dfbSurface); @@ -207,6 +204,17 @@ QPaintEngine *QDirectFBPaintDevice::paintEngine() const return engine; } +#ifdef QT_DIRECTFB_SUBSURFACE +void QDirectFBPaintDevice::releaseSubSurface() +{ + Q_ASSERT(QDirectFBScreen::instance()); + if (subSurface) { + screen->releaseDFBSurface(subSurface); + subSurface = 0; + } +} +#endif + QT_END_NAMESPACE #endif // QT_NO_QWS_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h index cdd2bea..adb80e2 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h @@ -86,6 +86,7 @@ protected: IDirectFBSurface *dfbSurface; #ifdef QT_DIRECTFB_SUBSURFACE + void releaseSubSurface(); IDirectFBSurface *subSurface; friend class QDirectFBPaintEnginePrivate; bool syncPending; |