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/inc/opengl/win | |
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/inc/opengl/win')
-rw-r--r-- | vcl/inc/opengl/win/gdiimpl.hxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/inc/opengl/win/gdiimpl.hxx b/vcl/inc/opengl/win/gdiimpl.hxx index e1fa195286a6..04bb15194de6 100644 --- a/vcl/inc/opengl/win/gdiimpl.hxx +++ b/vcl/inc/opengl/win/gdiimpl.hxx @@ -14,8 +14,7 @@ #include "openglgdiimpl.hxx" #include "win/salgdi.h" - -class OpenGLContext; +#include <vcl/opengl/OpenGLContext.hxx> class WinOpenGLSalGraphicsImpl : public OpenGLSalGraphicsImpl { @@ -31,8 +30,8 @@ public: SalGeometryProvider *mpProvider); protected: - virtual OpenGLContext* CreateWinContext() SAL_OVERRIDE; - virtual bool UseContext( OpenGLContext* pContext ) SAL_OVERRIDE; + virtual rtl::Reference<OpenGLContext> CreateWinContext() SAL_OVERRIDE; + virtual bool UseContext( const rtl::Reference<OpenGLContext> &pContext ) SAL_OVERRIDE; public: virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) SAL_OVERRIDE; |