diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-04-01 09:16:33 +0300 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-04-01 09:16:33 +0300 |
commit | 18e4cf290048726933bb5cf487e947e65b3550a6 (patch) | |
tree | 9e5024b21dbc18cfb8740fc3cda07804aa1470a4 /src/gui/painting/qplatformbackingstore.cpp | |
parent | ae5db669e8989fe793949346d8061c67e5ec31cd (diff) | |
parent | 9e97d64ccd27adcb2053c90cfbcafaef68e53893 (diff) |
Merge 5.12 into 5.12.3
Change-Id: I76905e3540585c3be221b89453c725828b05940b
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index afb4613ba5..c71d82546a 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -446,6 +446,11 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i d_ptr->blitter->setRedBlueSwizzle(false); } + // There is no way to tell if the OpenGL-rendered content is premultiplied or not. + // For compatibility, assume that it is not, and use normal alpha blend always. + if (d_ptr->premultiplied) + funcs->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE); + // Textures for renderToTexture widgets that have WA_AlwaysStackOnTop set. for (int i = 0; i < textures->count(); ++i) { if (textures->flags(i).testFlag(QPlatformTextureList::StacksOnTop)) |