summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetbackingstore.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-02-21 10:32:07 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-02-26 20:06:11 +0000
commitf9f9bea370fee029b28164c708b29d852e576945 (patch)
tree1af3042fa450cb6db16fcd94e6d4a450da42914e /src/widgets/kernel/qwidgetbackingstore.cpp
parent5bb4d064945db43d62ea24b5d23bf4b0b4420e38 (diff)
Compose renderToTexture widgets with sRGB when needed
Just requesting an sRGB texture for a QOpenGLWidget does not lead to anything useful when it comes to the end result, the content will just get darkened. For proper operation the target window's default framebuffer must be sRGB capable and linearization during blending must be enabled. Task-number: QTBUG-50987 Change-Id: Ibad0657c29a720590fa22c84c4bc303302de6dc0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidgetbackingstore.cpp')
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 781ad9600d..4421218d1d 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -945,9 +945,7 @@ static void findTextureWidgetsRecursively(QWidget *tlw, QWidget *widget, QPlatfo
{
QWidgetPrivate *wd = QWidgetPrivate::get(widget);
if (wd->renderToTexture) {
- QPlatformTextureList::Flags flags = 0;
- if (widget->testAttribute(Qt::WA_AlwaysStackOnTop))
- flags |= QPlatformTextureList::StacksOnTop;
+ QPlatformTextureList::Flags flags = wd->textureListFlags();
const QRect rect(widget->mapTo(tlw, QPoint()), widget->size());
widgetTextures->appendTexture(widget, wd->textureId(), rect, wd->clipRect(), flags);
}