Skip to content
Commit 258cecbf authored by David Edmundson's avatar David Edmundson
Browse files

windowthumbnail: Cleanup on scene graph invalidation

The documentation
(https://doc.qt.io/qt-6/qquickitem.html#graphics-resource-handling)
states that if we are doing our own low level handling of graphic
resources we need to perform cleanup in 3 places:

 - on item destruction
- when an item is removed from the scene (via the virtual
releaseResources)
- when the scenegraph gets invalidated (via a slot
invalidateSceneGraph)

We only handled the first two.

This would cause a crash if the window thumbnail is showing just an icon
instead of a thumbnail and we hit one of the nvidia context loss resets.
The atlas texture would be deleted, but we would keep a QSGTexture
refernecing something inside that for longer which would linger.

I believe we only need the texture provider to reset, but we may as well
do it all.

BUG: 445893
BUG:
parent 46a07ae1
Pipeline #471593 passed with stage
in 2 minutes and 8 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment