diff options
author | David Boddie <dboddie@trolltech.com> | 2009-07-07 13:00:14 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-07-07 13:00:14 (GMT) |
commit | f5392a4290e5f7ae2bdf268c1fa8c037e776fdae (patch) | |
tree | d3cc657639b8784dbc22eae2bae5e58e62db7a2f /src/opengl/qpixmapdata_gl.cpp | |
parent | 0044b3c968f5023f502e3574c96d4e4df0de865d (diff) | |
parent | 2a834d39a69430058df3916392afab064ca941ee (diff) | |
download | Qt-f5392a4290e5f7ae2bdf268c1fa8c037e776fdae.zip Qt-f5392a4290e5f7ae2bdf268c1fa8c037e776fdae.tar.gz Qt-f5392a4290e5f7ae2bdf268c1fa8c037e776fdae.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts:
src/network/socket/qlocalsocket.cpp
Diffstat (limited to 'src/opengl/qpixmapdata_gl.cpp')
-rw-r--r-- | src/opengl/qpixmapdata_gl.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 8a2187c..f0c7e20 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -254,8 +254,15 @@ void QGLPixmapData::fill(const QColor &color) if (!isValid()) return; - if (!m_textureId) + bool hasAlpha = color.alpha() != 255; + if (hasAlpha && !m_hasAlpha) { + if (m_textureId) { + glDeleteTextures(1, &m_textureId); + m_textureId = 0; + m_dirty = true; + } m_hasAlpha = color.alpha() != 255; + } if (useFramebufferObjects()) { m_source = QImage(); |