Sync rhi backingstore prefer-software env.var with Quick
Behaving differently in QQuickWindow vs. a QRhi-based widget window is not great for WebEngine. The env.var naming is not the best (QSG prefix) but we already have some precedent for this (recognizing QSG_INFO in QRhi), and there is no other choice anyway. Pick-to: 6.6 6.5 6.6.0 6.5.3 Task-number: QTBUG-116445 Change-Id: Ibfd495cbd1d42502441d6629325bdeb033e813f3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
12d6fc5229
commit
ffb857e9d0
@ -56,6 +56,11 @@ bool QBackingStoreRhiSupport::create()
|
|||||||
QOffscreenSurface *surface = nullptr;
|
QOffscreenSurface *surface = nullptr;
|
||||||
QRhi::Flags flags;
|
QRhi::Flags flags;
|
||||||
|
|
||||||
|
// This must be the same env.var. Qt Quick uses, to ensure symmetry in the
|
||||||
|
// behavior between a QQuickWindow and a (QRhi-based) widget top-level window.
|
||||||
|
if (qEnvironmentVariableIntValue("QSG_RHI_PREFER_SOFTWARE_RENDERER"))
|
||||||
|
flags |= QRhi::PreferSoftwareRenderer;
|
||||||
|
|
||||||
if (m_config.api() == QPlatformBackingStoreRhiConfig::Null) {
|
if (m_config.api() == QPlatformBackingStoreRhiConfig::Null) {
|
||||||
QRhiNullInitParams params;
|
QRhiNullInitParams params;
|
||||||
rhi = QRhi::create(QRhi::Null, ¶ms, flags);
|
rhi = QRhi::create(QRhi::Null, ¶ms, flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user