diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-09-07 22:21:15 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-09-08 13:04:02 +0100 |
commit | 2456cf8306be22e32130e789ab939c059e5e79e5 (patch) | |
tree | d188be461e188023fd4da0690e6278e76e596c2d /vcl/workben | |
parent | 64c6b0ed6c67d169021732d276ec02706e139261 (diff) |
tdf#94006 - re-factor to use rtl::Reference for OpenGLContexts.
Don't use rtl::Reference for the global / list state, so the
ref-count reflects the number of real users.
Hold a reference during ~OpenGLContext.
Change-Id: I4e57a7246159acd58ae7d5a0dfc8704b9795c894
Diffstat (limited to 'vcl/workben')
-rw-r--r-- | vcl/workben/vcldemo.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index b6c96e280a0e..b3c6c86f63b3 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1657,8 +1657,8 @@ class OpenGLTests VclPtr<WorkWindow> mxWinB; OpenGLSalGraphicsImpl *mpImplA; OpenGLSalGraphicsImpl *mpImplB; - OpenGLContext *mpA; - OpenGLContext *mpB; + rtl::Reference<OpenGLContext> mpA; + rtl::Reference<OpenGLContext> mpB; static OpenGLSalGraphicsImpl *getImpl(const VclPtr<OutputDevice> &xOut) { @@ -1682,7 +1682,7 @@ public: mpA = mpImplA->GetOpenGLContext(); mpB = mpImplB->GetOpenGLContext(); - assert (mpA && mpB); + assert (mpA.is() && mpB.is()); assert (mpA != mpB); } ~OpenGLTests() @@ -1715,9 +1715,9 @@ public: // get some other guys to leach off this context VclPtrInstance<VirtualDevice> xVDev; - OpenGLContext *pContext = getImpl(xVDev)->GetOpenGLContext(); + rtl::Reference<OpenGLContext> pContext = getImpl(xVDev)->GetOpenGLContext(); VclPtrInstance<VirtualDevice> xVDev2; - OpenGLContext *pContext2 = getImpl(xVDev)->GetOpenGLContext(); + rtl::Reference<OpenGLContext> pContext2 = getImpl(xVDev)->GetOpenGLContext(); // sharing the same off-screen context. assert(pContext == pContext2); |