From 500dc2a6f888e283c6d40730bdf7c2998ee0437b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 19 Sep 2011 00:57:45 +0200 Subject: [directfb] Introduce the QDirectFBPointer from QWS/gfxdrivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce QDirectFBPointer and use it throughout the code to fix various resource leaks in the DirectFB backend. Fix the surface ownership of the IDirectFBSurface in the Blittable/BackingStore code. Change-Id: I0d4572eaab80b3558e644f26d76222461bf37bbb Reviewed-by: Jørgen Lind --- src/plugins/platforms/directfb/qdirectfbcursor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/platforms/directfb/qdirectfbcursor.cpp') diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp index 869dc3f97d..123d69c58e 100644 --- a/src/plugins/platforms/directfb/qdirectfbcursor.cpp +++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp @@ -46,7 +46,7 @@ QDirectFBCursor::QDirectFBCursor(QPlatformScreen *screen) : QPlatformCursor(screen) { - QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, &m_layer); + QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, m_layer.outPtr()); m_image.reset(new QPlatformCursorImage(0, 0, 0, 0, 0, 0)); } @@ -69,11 +69,11 @@ void QDirectFBCursor::changeCursor(QCursor *cursor, QWindow *) map = cursor->pixmap(); } - IDirectFBSurface *surface = QDirectFbConvenience::dfbSurfaceForPlatformPixmap(map.handle()); + IDirectFBSurface* surface(QDirectFbConvenience::dfbSurfaceForPlatformPixmap(map.handle())); - if (m_layer->SetCooperativeLevel(m_layer, DLSCL_ADMINISTRATIVE) != DFB_OK) { + if (m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_ADMINISTRATIVE) != DFB_OK) { return; } - m_layer->SetCursorShape( m_layer, surface, xSpot, ySpot); - m_layer->SetCooperativeLevel(m_layer, DLSCL_SHARED); + m_layer->SetCursorShape(m_layer.data(), surface, xSpot, ySpot); + m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_SHARED); } -- cgit v1.2.3