Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
Right now, SpriteSequence does not check for duplication. It copies whatever needed into its own texture, even if the Sprite is referencing another existing one, or has the same source.
What original reporter suggests, quoted:
For instance, I think QQuickSpriteMaterial can use std::shared_ptr<QSGTexture> instead of raw pointer to QSGTexture and manual deletion on destruction. Then, you can manage a kind of global hash table of std::weak_ptr<QSGTexture> whose key is QList<QQuickSprite*>(and with combination of QSGContext* or QQuickWindow* or whatever can isolate graphics resource allocation).