summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpixmapdata_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qpixmapdata_gl.cpp')
-rw-r--r--src/opengl/qpixmapdata_gl.cpp9
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();