summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-19 13:13:47 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:11:41 +0100
commit3a091f8ca2f20d44c32ef954e23f664256686997 (patch)
tree53d9aab7e2b3c09776549cdf544fd9c12c9c1de1 /canvas
parentb5f08b336af03b78035d24114e78b7fdb98b8dce (diff)
Unwind VCLObject bits for OutputDevice derivatives.
Change-Id: I1abdf0a6d43029fb29e5cbc6c3f788aa98f55a1f
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/vcl/backbuffer.cxx10
-rw-r--r--canvas/source/vcl/backbuffer.hxx3
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx6
-rw-r--r--canvas/source/vcl/spritecanvashelper.hxx4
4 files changed, 19 insertions, 4 deletions
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index 73d6320fcba5..216b5eb4c6d5 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -43,14 +43,20 @@ namespace vclcanvas
}
}
+ BackBuffer::~BackBuffer()
+ {
+ SolarMutexGuard aGuard;
+ maVDev.disposeAndClear();
+ }
+
OutputDevice& BackBuffer::getOutDev()
{
- return maVDev.get();
+ return *maVDev.get();
}
const OutputDevice& BackBuffer::getOutDev() const
{
- return maVDev.get();
+ return *maVDev.get();
}
void BackBuffer::setSize( const ::Size& rNewSize )
diff --git a/canvas/source/vcl/backbuffer.hxx b/canvas/source/vcl/backbuffer.hxx
index 0fea559876dd..479f4dd3983b 100644
--- a/canvas/source/vcl/backbuffer.hxx
+++ b/canvas/source/vcl/backbuffer.hxx
@@ -43,6 +43,7 @@ namespace vclcanvas
*/
BackBuffer( const OutputDevice& rRefDevice,
bool bMonochromeBuffer=false );
+ ~BackBuffer();
virtual OutputDevice& getOutDev() SAL_OVERRIDE;
virtual const OutputDevice& getOutDev() const SAL_OVERRIDE;
@@ -50,7 +51,7 @@ namespace vclcanvas
void setSize( const ::Size& rNewSize );
private:
- ::canvas::vcltools::VCLObject<VirtualDevice> maVDev;
+ VclPtr< VirtualDevice > maVDev;
};
typedef ::boost::shared_ptr< BackBuffer > BackBufferSharedPtr;
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index 682950534135..8855dd567b71 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -189,6 +189,12 @@ namespace vclcanvas
#endif
}
+ SpriteCanvasHelper::~SpriteCanvasHelper()
+ {
+ SolarMutexGuard aGuard;
+ maVDev.disposeAndClear();
+ }
+
void SpriteCanvasHelper::init( const OutDevProviderSharedPtr& rOutDev,
SpriteCanvas& rOwningSpriteCanvas,
::canvas::SpriteRedrawManager& rManager,
diff --git a/canvas/source/vcl/spritecanvashelper.hxx b/canvas/source/vcl/spritecanvashelper.hxx
index dc165d460296..0396217065fc 100644
--- a/canvas/source/vcl/spritecanvashelper.hxx
+++ b/canvas/source/vcl/spritecanvashelper.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
+#include <vcl/vclptr.hxx>
#include <vcl/virdev.hxx>
#include <canvas/spriteredrawmanager.hxx>
@@ -40,6 +41,7 @@ namespace vclcanvas
{
public:
SpriteCanvasHelper();
+ ~SpriteCanvasHelper()
void init( const OutDevProviderSharedPtr& rOutDev,
SpriteCanvas& rOwningSpriteCanvas,
@@ -150,7 +152,7 @@ namespace vclcanvas
Typically, sprites will be composited in the background,
before pushing them to screen. This happens here.
*/
- ::canvas::vcltools::VCLObject< VirtualDevice > maVDev;
+ VclPtr< VirtualDevice > maVDev;
/// For the frame counter timings
::canvas::tools::ElapsedTime maLastUpdate;