eglfs: delete cursor textures in the destructor

Change-Id: I7e86313134c428bacda41f5e5401ebc392ceecd8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Girish Ramakrishnan 2012-05-16 11:13:54 -07:00 committed by Qt by Nokia
parent ff3a081827
commit 40583c3d31

View File

@ -42,6 +42,7 @@
#include "qeglfscursor.h" #include "qeglfscursor.h"
#include <QtGui/qwindowsysteminterface_qpa.h> #include <QtGui/qwindowsysteminterface_qpa.h>
#include <QtGui/QOpenGLShaderProgram> #include <QtGui/QOpenGLShaderProgram>
#include <QtGui/QOpenGLContext>
#include <QtDebug> #include <QtDebug>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -61,7 +62,12 @@ QEglFSCursor::QEglFSCursor(QEglFSScreen *screen)
QEglFSCursor::~QEglFSCursor() 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() void QEglFSCursor::createShaderPrograms()