mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2025-01-23 04:14:37 +08:00
qwidgetbackingstore.cpp from 5.12.1
This commit is contained in:
parent
7d4c5a3a3d
commit
54152e1fc7
@ -101,6 +101,13 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack
|
|||||||
|
|
||||||
if (tlw->testAttribute(Qt::WA_DontShowOnScreen) || widget->testAttribute(Qt::WA_DontShowOnScreen))
|
if (tlw->testAttribute(Qt::WA_DontShowOnScreen) || widget->testAttribute(Qt::WA_DontShowOnScreen))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Foreign Windows do not have backing store content and must not be flushed
|
||||||
|
if (QWindow *widgetWindow = widget->windowHandle()) {
|
||||||
|
if (widgetWindow->type() == Qt::ForeignWindow)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static bool fpsDebug = qEnvironmentVariableIntValue("QT_DEBUG_FPS");
|
static bool fpsDebug = qEnvironmentVariableIntValue("QT_DEBUG_FPS");
|
||||||
if (fpsDebug) {
|
if (fpsDebug) {
|
||||||
if (!widgetBackingStore->perfFrames++)
|
if (!widgetBackingStore->perfFrames++)
|
||||||
@ -1053,21 +1060,9 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget)
|
|||||||
static bool switchableWidgetComposition =
|
static bool switchableWidgetComposition =
|
||||||
QGuiApplicationPrivate::instance()->platformIntegration()
|
QGuiApplicationPrivate::instance()->platformIntegration()
|
||||||
->hasCapability(QPlatformIntegration::SwitchableWidgetComposition);
|
->hasCapability(QPlatformIntegration::SwitchableWidgetComposition);
|
||||||
if (!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
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return qt_dummy_platformTextureList();
|
return qt_dummy_platformTextureList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user