summaryrefslogtreecommitdiffstats
path: root/vcl/inc/openglgdiimpl.hxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-09-07 22:21:15 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-09-08 13:04:02 +0100
commit2456cf8306be22e32130e789ab939c059e5e79e5 (patch)
treed188be461e188023fd4da0690e6278e76e596c2d /vcl/inc/openglgdiimpl.hxx
parentUSE_MEMPOOL is not defined anywhere (diff)
downloadcore-2456cf8306be22e32130e789ab939c059e5e79e5.tar.gz
core-2456cf8306be22e32130e789ab939c059e5e79e5.zip
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/inc/openglgdiimpl.hxx')
-rw-r--r--vcl/inc/openglgdiimpl.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 62a51e1b6df1..71a9e803c8da 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -52,7 +52,7 @@ class VCL_DLLPUBLIC OpenGLSalGraphicsImpl : public SalGraphicsImpl
friend class OpenGLTests;
protected:
- OpenGLContext* mpContext;
+ rtl::Reference<OpenGLContext> mpContext;
SalGraphics& mrParent;
/// Pointer to the SalFrame or SalVirtualDevice
SalGeometryProvider* mpProvider;
@@ -137,19 +137,19 @@ protected:
bool ReleaseContext();
// retrieve the default context for offscreen rendering
- static OpenGLContext* GetDefaultContext();
+ static rtl::Reference<OpenGLContext> GetDefaultContext();
// create a new context for window rendering
- virtual OpenGLContext* CreateWinContext() = 0;
+ virtual rtl::Reference<OpenGLContext> CreateWinContext() = 0;
// check whether the given context can be used by this instance
- virtual bool UseContext( OpenGLContext* pContext ) = 0;
+ virtual bool UseContext( const rtl::Reference<OpenGLContext> &pContext ) = 0;
public:
OpenGLSalGraphicsImpl(SalGraphics& pParent, SalGeometryProvider *pProvider);
virtual ~OpenGLSalGraphicsImpl ();
- OpenGLContext* GetOpenGLContext();
+ rtl::Reference<OpenGLContext> GetOpenGLContext();
virtual void Init() SAL_OVERRIDE;