diff --git a/src/gui/painting/qbackingstorerhisupport.cpp b/src/gui/painting/qbackingstorerhisupport.cpp index 77240f0f92..e068f1880d 100644 --- a/src/gui/painting/qbackingstorerhisupport.cpp +++ b/src/gui/painting/qbackingstorerhisupport.cpp @@ -56,10 +56,13 @@ bool QBackingStoreRhiSupport::create() QOffscreenSurface *surface = nullptr; 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. + // These must be the same env.vars Qt Quick uses (as documented), in order + // 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 (qEnvironmentVariableIntValue("QSG_RHI_PROFILE")) + flags |= QRhi::EnableDebugMarkers | QRhi::EnableTimestamps; if (m_config.api() == QPlatformBackingStoreRhiConfig::Null) { QRhiNullInitParams params;