summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-05-16 11:13:54 -0700
committerQt by Nokia <qt-info@nokia.com>2012-05-17 05:14:31 +0200
commit40583c3d31422921ad90212fb179ac5e62261e5a (patch)
tree99b3d986e2846fb22dea2a1e9d3372bdee0fbd00 /src
parentff3a081827fa1408015ca3bc9fdb35e912b198dd (diff)
eglfs: delete cursor textures in the destructor
Change-Id: I7e86313134c428bacda41f5e5401ebc392ceecd8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/eglfs/qeglfscursor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfscursor.cpp b/src/plugins/platforms/eglfs/qeglfscursor.cpp
index a6e1a320e9..f997b64a0c 100644
--- a/src/plugins/platforms/eglfs/qeglfscursor.cpp
+++ b/src/plugins/platforms/eglfs/qeglfscursor.cpp
@@ -42,6 +42,7 @@
#include "qeglfscursor.h"
#include <QtGui/qwindowsysteminterface_qpa.h>
#include <QtGui/QOpenGLShaderProgram>
+#include <QtGui/QOpenGLContext>
#include <QtDebug>
QT_BEGIN_NAMESPACE
@@ -61,7 +62,12 @@ QEglFSCursor::QEglFSCursor(QEglFSScreen *screen)
QEglFSCursor::~QEglFSCursor()
{
- // destroy atlas?
+ if (QOpenGLContext::currentContext()) {
+ if (m_cursor.shape == Qt::BitmapCursor && m_cursor.texture)
+ glDeleteTextures(1, &m_cursor.texture);
+
+ glDeleteTextures(1, &m_cursorAtlas.texture);
+ }
}
void QEglFSCursor::createShaderPrograms()