diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-12-13 13:23:53 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-12-14 11:18:04 +0000 |
commit | 2f3837cdbce8b27499db03f376e3781f5aede317 (patch) | |
tree | 740fe336f3ba9e53f8ffe2dace403c7c585254be /src/render/backend/renderer_p.h | |
parent | 718126df5a180346675601782b4a879a0a9b2b8a (diff) |
Textures: properly abandon and release texture data
When a texture is destroyed it now properly destroys the GLTexture
if the GLTexture was not being shared.
Also, when a GLTexture is created but the texture image data for its content
already existed, make sure we still request the data to be uploaded.
This happens since functors can be shared, in which case the image data isn't
reloaded and therefore doesn't call texture->requestUpload() implicitly.
Task-number: QTBUG-57595
Change-Id: Id8f437ff64eea39be75ebb1a548516b29932e23e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/backend/renderer_p.h')
-rw-r--r-- | src/render/backend/renderer_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/render/backend/renderer_p.h b/src/render/backend/renderer_p.h index cc90abe00..965bccbcf 100644 --- a/src/render/backend/renderer_p.h +++ b/src/render/backend/renderer_p.h @@ -199,6 +199,7 @@ public: void updateGLResources(); void updateTexture(Texture *texture); + void cleanupTexture(const Texture *texture); void prepareCommandsSubmission(const QVector<RenderView *> &renderViews); bool executeCommandsSubmission(const RenderView *rv); |