From 4b7cb3bc91e100c591134c1c32c397477356d2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 2 Aug 2018 16:20:06 +0200 Subject: Don't trigger composeAndFlush for native child widgets unless needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The textureChildSeen flag is set on each widget the first time it has a child needing textures, which triggers the composeAndFlush codepath. If a top level widget had a child needing this codepath, but other native children not needing it, we ended up always using composeAndFlush for the native children, since we were checking textureChildSeen of the top level widget. We should check the child widget instead, which will never have the flag set unless itself had children that required composeAndFlush. This matches the logic in findAllTextureWidgetsRecursively, which also checks the child widget and not the top level widget. Done-width: Laszlo Agocs Change-Id: I65064eef41e56d9c1a789a96cedb98b11e8a177a Reviewed-by: Laszlo Agocs Reviewed-by: Tor Arne Vestbø --- src/widgets/kernel/qwidgetbackingstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 235c93bc18..cbf949be92 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -1044,7 +1044,7 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget) } } - if (QWidgetPrivate::get(tlw)->textureChildSeen) { + if (QWidgetPrivate::get(widget)->textureChildSeen) { // No render-to-texture widgets in the (sub-)tree due to hidden or native // children. Returning null results in using the normal backingstore flush path // without OpenGL-based compositing. This is very desirable normally. However, -- cgit v1.2.3