Fix composition for translucent AlwaysStackOnTop widgets

Writing out the alpha is re-enabled too early. When blitting the
AlwaysStackOnTop widgets as the last step of the composition, they
need the exact same settings as the backingstore content, meaning
blending but without writing out alpha.

Move the glColorMask call to fix this. This will avoid issues with
semi-transparent AlwaysStackOnTop widgets when the top-level has
alpha enabled too.

Task-number: QTBUG-40910
Change-Id: Id6d0d684cfa78bf79b65a097efd92de575e73b2c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
bb10
Laszlo Agocs 2014-08-22 09:38:35 +02:00
parent a0cc43fbc8
commit f16de5c1fd
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,6 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
if (d_ptr->needsSwizzle)
d_ptr->blitter->setSwizzleRB(false);
}
funcs->glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
// Textures for renderToTexture widgets that have WA_AlwaysStackOnTop set.
for (int i = 0; i < textures->count(); ++i) {
@ -287,6 +286,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
}
}
funcs->glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
funcs->glDisable(GL_BLEND);
d_ptr->blitter->release();