diff options
author | David Redondo <qt@david-redondo.de> | 2023-03-01 08:47:04 +0100 |
---|---|---|
committer | David Redondo <qt@david-redondo.de> | 2023-03-17 14:45:21 +0100 |
commit | 141d626029776a6b7a6f2fbc29a051221c0742e9 (patch) | |
tree | cfe36f293a22b3b22a1b4170737305b2ee68a356 /src/gui/painting/qplatformbackingstore.cpp | |
parent | b538a53a9d2a581c2fddf5dae0a504ef954c3641 (diff) |
Handle device loss for texture widgets
Previously the widget stayed black and we printed
"QBackingStoreDefaultCompositor: the QRhi has changed unexpectedly,
this should not happen".
To make it work the compositor is recreated in addition to the rhi
and the widgets are informed with the internal events.
Change-Id: I982d08bd3530478fe0f827080154c008a92a812e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 82e7778b86..f7c4df40c8 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -379,6 +379,7 @@ void QPlatformBackingStore::graphicsDeviceReportedLost() return; qWarning("Rhi backingstore: graphics device lost, attempting to reinitialize"); + d_ptr->compositor.reset(); d_ptr->rhiSupport.reset(); d_ptr->rhiSupport.create(); if (!d_ptr->rhiSupport.rhi()) |