summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-16 01:32:35 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-16 01:32:35 (GMT)
commit6f3649260d157584361112a94733b92f10c01b84 (patch)
tree13197132bd1f3854572728ff1699fa6780021365 /src/opengl/qgl.cpp
parentb77e592cf9709c31f61c3e1d229b2a6c446ab8bc (diff)
parente7041de4d51a3166948924fc8640c8c6bc8daa7b (diff)
downloadQt-6f3649260d157584361112a94733b92f10c01b84.zip
Qt-6f3649260d157584361112a94733b92f10c01b84.tar.gz
Qt-6f3649260d157584361112a94733b92f10c01b84.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 3e5c4fc..cfcbbf8 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -99,6 +99,10 @@ QT_BEGIN_NAMESPACE
QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs;
#endif
+#ifdef Q_WS_X11
+extern const QX11Info *qt_x11Info(const QPaintDevice *pd);
+#endif
+
struct QGLThreadContext {
QGLContext *context;
};
@@ -2448,7 +2452,10 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
#if defined(Q_WS_X11)
// Try to use texture_from_pixmap
- if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType) {
+ const QX11Info *xinfo = qt_x11Info(paintDevice);
+ if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType
+ && xinfo && xinfo->screen() == pixmap.x11Info().screen())
+ {
texture = bindTextureFromNativePixmap(pd, key, options);
if (texture) {
texture->options |= QGLContext::MemoryManagedBindOption;