diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-08-31 00:29:56 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-08-31 00:29:56 (GMT) |
commit | f5c0745622a914003aa75aaaa1e828854c1c85ba (patch) | |
tree | 6f9c27a22d5987a8bddd512222ab29dfeda5caf3 /src/opengl/qgl_x11egl.cpp | |
parent | 9cc59a858d116f75c19a782602ab8679405d9764 (diff) | |
parent | 9dade8d2e57655019ed4dc2fcdc4e226401138a2 (diff) | |
download | Qt-f5c0745622a914003aa75aaaa1e828854c1c85ba.zip Qt-f5c0745622a914003aa75aaaa1e828854c1c85ba.tar.gz Qt-f5c0745622a914003aa75aaaa1e828854c1c85ba.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/opengl/qgl_x11egl.cpp')
-rw-r--r-- | src/opengl/qgl_x11egl.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index b982a19..f40cdc9 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -490,12 +490,13 @@ void QGLWidgetPrivate::recreateEglSurface(bool force) } -QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, const qint64 key, bool canInvert) +QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, const qint64 key, + QGLContext::BindOptions options) { Q_Q(QGLContext); // The EGL texture_from_pixmap has no facility to invert the y coordinate - if (!canInvert) + if (!(options & QGLContext::CanFlipNativePixmapBindOption)) return 0; Q_ASSERT(pd->classId() == QPixmapData::X11Class); @@ -623,7 +624,10 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons return 0; } - QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, canInvert, true); + // Always inverted because the opposite is not supported... + options |= QGLContext::InvertedYBindOption; + + QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, options); pixmapData->flags |= QX11PixmapData::InvertedWhenBoundToTexture; // We assume the cost of bound pixmaps is zero |