diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-12-02 21:51:50 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-03 00:20:03 +0100 |
commit | a15a538fb191b1851f366716914822411b583c58 (patch) | |
tree | 2ab3d29f9f62627162922d2e31eb7bfc22ce566e /vcl/source | |
parent | 815f515b8ff14f0542ec5f7898ca98d589b193eb (diff) |
Revert "use boost::shared_ptr instead of manual ref counting"
This reverts commit 8eeb02dcc1a4bc99b083b1a591b4a70003a1604f.
Conflicts:
include/vcl/opengl/OpenGLContext.hxx
vcl/inc/openglgdiimpl.hxx
vcl/opengl/gdiimpl.cxx
Change-Id: I85cc7a46876ffba5ab861f6dd83b07da466b212b
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 2160c6e04ba0..01b74b9f6900 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -53,6 +53,7 @@ OpenGLContext::OpenGLContext(): mpWindow(NULL), m_pChildWindow(NULL), mbInitialized(false), + mnRefCount(1), mbRequestLegacyContext(false), mbUseDoubleBufferedRendering(true), mbRequestVirtualDevice(false), @@ -122,6 +123,17 @@ OpenGLContext::~OpenGLContext() #endif } +void OpenGLContext::AddRef() +{ + mnRefCount++; +} + +void OpenGLContext::DeRef() +{ + if( --mnRefCount == 0 ) + delete this; +} + void OpenGLContext::requestLegacyContext() { mbRequestLegacyContext = true; |