diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-10-02 09:45:57 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-10-07 09:15:05 +0200 |
commit | f4744a77224009cb46a254614106b9034a84fd4f (patch) | |
tree | 5961198607ec480ca8331fce537be4235d47257a /src/qml | |
parent | 654c48f6746d0c57b4c708bd0e90e86921cc377f (diff) |
Fix sprites leaking textures in SW and OpenVG backends
When a QSGSpriteNode is initialized with a texture, it is supposed to
take ownership of the texture and delete it when the node gets
deleted. In the default backend, this happens automatically: The
texture gets assigned to the node's QSGMaterial object, and the node
has set the OwnsMaterial flag, and so the inherited QSGGeometry
destructor takes care of deleting the material, which deletes the
texture.
However, the Software and OpenVG backends do not have material
objects, so the above mechanism does not apply, and so the texture
objects are leaked. Fix by deleting the texture object directly from
the SoftwareSpriteNode and OpenVGSpriteNode destructors.
Fixes: QTBUG-77019
Change-Id: I503d704f66593ba6a36c969db80f74f715382b6b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/qml')
0 files changed, 0 insertions, 0 deletions