summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicscontext.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-01-22 11:31:22 +0100
committerPaul Lemire <paul.lemire@kdab.com>2016-03-17 11:27:53 +0000
commit7ff2cc9c1f037fa9159bc24d8a47778ebac2390a (patch)
treed96af4c0415662906c1c6fa5a64601b539cb106a /src/render/graphicshelpers/graphicscontext.cpp
parentc01bc22c287e58186a285b3f8507711fd982fd05 (diff)
Renderer/QRenderTargetSurfaceSelector: implement proper synchronization
This is needed to avoid rendering on a surface that has been destroyed. Change-Id: Iadc2a32e2e0113704ca4df48df6bcdd1a0d8256c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index 30af526d4..6c0f69947 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -342,6 +342,11 @@ void GraphicsContext::activateGLHelper()
}
}
+bool GraphicsContext::hasValidGLHelper() const
+{
+ return m_glHelper != Q_NULLPTR;
+}
+
bool GraphicsContext::makeCurrent(QSurface *surface)
{
Q_ASSERT(m_gl);