From 52a9d06bb028a16d9cf9be563a8ad1df09023439 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 22 Jan 2014 10:26:14 +0100 Subject: Enforce texture cleanup to happen at the end of the sync phase. This was ok for the threaded renderer, but for the single-threaded renderers where the event loop was spinning we could run the risk of scheduling a texture for deleteLater() and then cleaning it up before we got around to the sync phase. Task-number: QTBUG-35670 Change-Id: I92074294b427fd8ab2a1823ba79c7ac3b59094ec Reviewed-by: Michael Brasser --- src/quick/scenegraph/qsgcontext_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/scenegraph/qsgcontext_p.h') diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h index c562a909c5..c1bf78a018 100644 --- a/src/quick/scenegraph/qsgcontext_p.h +++ b/src/quick/scenegraph/qsgcontext_p.h @@ -94,6 +94,7 @@ public: virtual void invalidate(); virtual void renderNextFrame(QSGRenderer *renderer, GLuint fboId); + virtual void endSync(); virtual QSharedPointer depthStencilBufferForFbo(QOpenGLFramebufferObject *fbo); QSGDepthStencilBufferManager *depthStencilBufferManager(); @@ -124,6 +125,7 @@ protected: QMutex m_mutex; QHash m_textures; + QSet m_texturesToDelete; QSGAtlasTexture::Manager *m_atlasManager; QSGDepthStencilBufferManager *m_depthStencilManager; -- cgit v1.2.3