summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 143b2e9..8235a5c 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1233,7 +1233,7 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem
if (glyphType == QFontEngineGlyphCache::Raster_RGBMask) {
- if (d->deviceHasAlpha || txtype > QTransform::TxTranslate
+ if (d->device->alphaRequested() || txtype > QTransform::TxTranslate
|| (state()->composition_mode != QPainter::CompositionMode_Source
&& state()->composition_mode != QPainter::CompositionMode_SourceOver))
{
@@ -1529,27 +1529,6 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->dirtyStencilRegion = QRect(0, 0, d->width, d->height);
d->stencilClean = true;
- switch (pdev->devType()) {
- case QInternal::Pixmap:
- d->deviceHasAlpha = static_cast<QPixmap *>(pdev)->hasAlphaChannel();
- break;
- case QInternal::FramebufferObject:
- {
- GLenum f = static_cast<QGLFramebufferObject *>(pdev)->format().internalTextureFormat();
- d->deviceHasAlpha = (f != GL_RGB
-#ifndef QT_OPENGL_ES
- && f != GL_RGB5 && f != GL_RGB8
-#endif
- );
- }
- break;
- default:
- // widget, pbuffer
- d->deviceHasAlpha = d->ctx->d_func()->reqFormat.alpha();
- break;
- }
-
-
// Calling begin paint should make the correct context current. So, any
// code which calls into GL or otherwise needs a current context *must*
// go after beginPaint: