Skip to content

Commit

Permalink
windows: Give up on SwitchableComposition
Browse files Browse the repository at this point in the history
Opt out of switching between the normal and OpenGL based flush paths.
Once a QOpenGLWidget or QQuickWidget becomes visible in a window, the
window contents will be composed using OpenGL from that point on, even
if said widgets become invisible afterwards. Now that Qt Creator does
not rely on QQuickWidget the issue is less burning anyways.

Task-number: QTBUG-68329
Change-Id: I177e6e6094ee06ea26d8d0343bd3d84aadfa5913
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
  • Loading branch information
alpqr committed Nov 5, 2018
1 parent c9d18d4 commit 67c66c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/plugins/platforms/windows/qwindowsintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co
case AllGLFunctionsQueryable:
return true;
case SwitchableWidgetComposition:
return true;
return false; // QTBUG-68329 QTBUG-53515 QTBUG-54734
default:
return QPlatformIntegration::hasCapability(cap);
}
Expand Down
14 changes: 1 addition & 13 deletions src/widgets/kernel/qwidgetbackingstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,20 +1000,8 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget)
static bool switchableWidgetComposition =
QGuiApplicationPrivate::instance()->platformIntegration()
->hasCapability(QPlatformIntegration::SwitchableWidgetComposition);
if (!switchableWidgetComposition
// The Windows compositor handles fullscreen OpenGL window specially. Besides
// having trouble with popups, it also has issues with flip-flopping between
// OpenGL-based and normal flushing. Therefore, stick with GL for fullscreen
// windows (QTBUG-53515). Similary, translucent windows should not switch to
// layered native windows (QTBUG-54734).
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE)
|| tlw->windowState().testFlag(Qt::WindowFullScreen)
|| tlw->testAttribute(Qt::WA_TranslucentBackground)
#endif
)
{
if (!switchableWidgetComposition)
return qt_dummy_platformTextureList();
}
}

return 0;
Expand Down

0 comments on commit 67c66c4

Please sign in to comment.