diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-09-08 11:46:13 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-09-08 13:04:02 +0100 |
commit | 56900a441de1d4cc896ad1e36a44622ed1598fad (patch) | |
tree | ae176203c003dce23d188dbd198359da802d728f /slideshow | |
parent | 2456cf8306be22e32130e789ab939c059e5e79e5 (diff) |
tdf#94006 - fix OpenGLContext mis-use in several places.
gltf rendering, OpenGL canvas, GL transitions & GL capable (charts)
Avoid GLX operations on un-initialized contexts.
Change-Id: I7f523640f66ab656896181e5c865879234f6640e
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx index 78f897519c4f..5ac45f376eb9 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx @@ -228,7 +228,7 @@ private: void impl_finishTransition(); private: - boost::shared_ptr<OpenGLContext> mpContext; + rtl::Reference<OpenGLContext> mpContext; /** OpenGL handle to the leaving slide's texture */ @@ -368,7 +368,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta sal_Int64 aVal = 0; aDeviceParams[1] >>= aVal; - mpContext = boost::make_shared<OpenGLContext>(); + mpContext = OpenGLContext::Create(); mpContext->requestLegacyContext(); if( !mpContext->init( reinterpret_cast< vcl::Window* >( aVal ) ) ) @@ -1323,7 +1323,7 @@ void OGLTransitionerImpl::impl_dispose() { impl_finishTransition(); disposeTextures(); - mpContext.reset(); + mpContext.clear(); } // we are about to be disposed (someone call dispose() on us) @@ -1350,7 +1350,7 @@ void OGLTransitionerImpl::disposing() #endif #if defined( UNX ) && !defined( MACOSX ) - if( mbRestoreSync && bool(mpContext) ) { + if( mbRestoreSync && bool(mpContext.is()) ) { // try to reestablish synchronize state char* sal_synchronize = getenv("SAL_SYNCHRONIZE"); XSynchronize( mpContext->getOpenGLWindow().dpy, sal_synchronize && *sal_synchronize == '1' ); |