diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-01 11:22:31 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-01 23:17:44 +0200 |
commit | 76859e50d4b986fb88c2f193a70fd9b40963c59a (patch) | |
tree | 510d5553d472017e343fc1ca755ea7e313313d39 /src/quick/items/context2d/qquickcontext2d_p.h | |
parent | 557d73575978b873bb01ea791ae237fa6067fa7f (diff) |
More QQuickCanvas cleanup handling.
Avoid calling into QQuickContext2D from QQuickContext2DTexture
after QQuickContext2D has been deleted. We acheive this by
1. Giving the texture a direct pointer to the gl context and
and surface, so that it doesn't need to go through m_context
to get to them (which may have been deleted).
2. Protect access to QQuickContext2DTexture::m_context with
a mutex and make sure it is set to 0 in a safe manner
when the QQuickContext2D object is deleted.
Change-Id: Ie0a30f9fc46f844224838a7cdf2f28a62e8ce322
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2d_p.h')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d_p.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index bd1a83ce08..c679bc33cb 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -185,7 +185,6 @@ public: QQuickCanvasItem* canvas() const { return m_canvas; } QQuickContext2DCommandBuffer* buffer() const { return m_buffer; } - QQuickContext2DCommandBuffer* nextBuffer(); bool bufferValid() const { return m_buffer != 0; } void popState(); @@ -255,7 +254,7 @@ public: QImage m_grabbedImage; bool m_grabbed:1; - QMutex m_mutex; + static QMutex mutex; }; |