summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-10-30 09:08:24 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-10-30 09:08:24 (GMT)
commit8efb1eb4b112dfe718f47a5b99cd9a839ac62752 (patch)
treec19cdce456e2c142033e530e59954ff0b78a6dea /src/opengl
parentdc4e074324eb91a8a16e14c86ff41b03647b4cfa (diff)
parent2f9c37c4b48c4b5005c89f1c5a5fa036e1e22811 (diff)
downloadQt-8efb1eb4b112dfe718f47a5b99cd9a839ac62752.zip
Qt-8efb1eb4b112dfe718f47a5b99cd9a839ac62752.tar.gz
Qt-8efb1eb4b112dfe718f47a5b99cd9a839ac62752.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl.cpp4
-rw-r--r--src/opengl/qgl_x11.cpp3
-rw-r--r--src/opengl/qgl_x11egl.cpp3
3 files changed, 6 insertions, 4 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index e80521b..3fec1f0 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2137,7 +2137,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
Q_ASSERT(texture);
if (texture->id > 0)
- const_cast<QImage &>(image).data_ptr()->is_cached = true;
+ QImagePixmapCleanupHooks::enableCleanupHooks(image);
return texture;
}
@@ -2396,7 +2396,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
Q_ASSERT(texture);
if (texture->id > 0)
- const_cast<QPixmap &>(pixmap).data_ptr()->is_cached = true;
+ QImagePixmapCleanupHooks::enableCleanupHooks(pixmap);
return texture;
}
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index 86e593d..899047a 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -53,6 +53,7 @@
#include <private/qfontengine_ft_p.h>
#include <private/qt_x11_p.h>
#include <private/qpixmap_x11_p.h>
+#include <private/qimagepixmapcleanuphooks_p.h>
#ifdef Q_OS_HPUX
// for GLXPBuffer
#include <private/qglpixelbuffer_p.h>
@@ -1704,7 +1705,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, con
pixmapData->gl_surface = (Qt::HANDLE)glxPixmap;
// Make sure the cleanup hook gets called so we can delete the glx pixmap
- pixmapData->is_cached = true;
+ QImagePixmapCleanupHooks::enableCleanupHooks(pixmapData);
}
GLuint textureId;
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 7180682..9b20297 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -42,6 +42,7 @@
#include "qgl.h"
#include <private/qt_x11_p.h>
#include <private/qpixmap_x11_p.h>
+#include <private/qimagepixmapcleanuphooks_p.h>
#include <private/qgl_p.h>
#include <private/qpaintengine_opengl_p.h>
#include "qgl_egl_p.h"
@@ -531,7 +532,7 @@ bool Q_OPENGL_EXPORT qt_createEGLSurfaceForPixmap(QPixmapData* pmd, bool readOnl
Q_ASSERT(sizeof(Qt::HANDLE) >= sizeof(EGLSurface)); // Just to make totally sure!
pixmapData->gl_surface = (Qt::HANDLE)pixmapSurface;
- pixmapData->is_cached = true; // Make sure the cleanup hook gets called
+ QImagePixmapCleanupHooks::enableCleanupHooks(pixmapData); // Make sure the cleanup hook gets called
return true;
}