summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-03-22 13:21:23 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-26 12:32:54 (GMT)
commit7488aa544bdfccc0131427669266a93c44501c42 (patch)
tree21914ebef2a397d19f7bcf6f8bc981602dc833d5 /src/opengl/qgl_x11.cpp
parent75bb84ac0e6f17446d87a34ae8a644abff6009af (diff)
downloadQt-7488aa544bdfccc0131427669266a93c44501c42.zip
Qt-7488aa544bdfccc0131427669266a93c44501c42.tar.gz
Qt-7488aa544bdfccc0131427669266a93c44501c42.tar.bz2
Avoid having to create temporary QPixmaps when binding to texture
Reviewed-By: TrustMe
Diffstat (limited to 'src/opengl/qgl_x11.cpp')
-rw-r--r--src/opengl/qgl_x11.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index 4fa1467..e1a202f 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1671,7 +1671,7 @@ static bool qt_resolveTextureFromPixmap(QPaintDevice *paintDevice)
#endif //defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX)
-QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, const qint64 key,
+QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, const qint64 key,
QGLContext::BindOptions options)
{
#if !defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX)
@@ -1679,12 +1679,12 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, con
#else
Q_Q(QGLContext);
- Q_ASSERT(pmd->classId() == QPixmapData::X11Class);
+ QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pixmap->data_ptr().data());
+ Q_ASSERT(pixmapData->classId() == QPixmapData::X11Class);
if (!qt_resolveTextureFromPixmap(paintDevice))
return 0;
- QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd);
const QX11Info &x11Info = pixmapData->xinfo;
// Store the configs (Can be static because configs aren't dependent on current context)