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/source/app | |
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/source/app')
-rw-r--r-- | vcl/source/app/svdata.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index bfc2bb402ee7..ca815a2f3103 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -140,15 +140,9 @@ vcl::Window* ImplGetDefaultWindow() pSVData->mpDefaultWin->SetText( OUString( "VCL ImplGetDefaultWindow" ) ); // Add a reference to the default context so it never gets deleted - OpenGLContext* pContext = pSVData->mpDefaultWin->GetGraphics()->GetOpenGLContext(); - if( pContext ) - { -#ifdef DBG_UTIL - pContext->AddRef(NULL); -#else - pContext->AddRef(); -#endif - } + rtl::Reference<OpenGLContext> pContext = pSVData->mpDefaultWin->GetGraphics()->GetOpenGLContext(); + if( pContext.is() ) + pContext->acquire(); } Application::GetSolarMutex().release(); } |