Handle rhi init failures better in rhi backingstore flush
One may very well force a 3D API not functional. In this case there will be no QRhi. A bunch of warnings will be printed (which is good), but then flush() should not do anything, and that was not handled before. Change-Id: I82139070311152c959d39a553842f4462d8e7811 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 108b1014415a491cb0abb58c04a28a5c691085a1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
908bf2bac4
commit
ac6fcaf565
@ -455,6 +455,9 @@ QPlatformBackingStore::FlushResult QBackingStoreDefaultCompositor::flush(QPlatfo
|
|||||||
QPlatformTextureList *textures,
|
QPlatformTextureList *textures,
|
||||||
bool translucentBackground)
|
bool translucentBackground)
|
||||||
{
|
{
|
||||||
|
if (!rhi)
|
||||||
|
return QPlatformBackingStore::FlushFailed;
|
||||||
|
|
||||||
Q_ASSERT(textures); // may be empty if there are no render-to-texture widgets at all, but null it cannot be
|
Q_ASSERT(textures); // may be empty if there are no render-to-texture widgets at all, but null it cannot be
|
||||||
|
|
||||||
if (!m_rhi) {
|
if (!m_rhi) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user