diff options
Diffstat (limited to 'canvas/source/directx/dx_devicehelper.cxx')
-rw-r--r-- | canvas/source/directx/dx_devicehelper.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/canvas/source/directx/dx_devicehelper.cxx b/canvas/source/directx/dx_devicehelper.cxx index 767488f75672..1c724bca5513 100644 --- a/canvas/source/directx/dx_devicehelper.cxx +++ b/canvas/source/directx/dx_devicehelper.cxx @@ -19,6 +19,8 @@ #include <sal/config.h> +#include <memory> + #include <basegfx/utils/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <tools/diagnose_ex.h> @@ -133,10 +135,9 @@ namespace dxcanvas if( !mpDevice ) return uno::Reference< rendering::XBitmap >(); // we're disposed - DXBitmapSharedPtr pBitmap( - new DXBitmap( + DXBitmapSharedPtr pBitmap = std::make_shared<DXBitmap>( ::basegfx::unotools::b2ISizeFromIntegerSize2D(size), - false)); + false); // create a 24bit RGB system memory surface return uno::Reference< rendering::XBitmap >(new CanvasBitmap(pBitmap,mpDevice)); @@ -156,10 +157,9 @@ namespace dxcanvas if( !mpDevice ) return uno::Reference< rendering::XBitmap >(); // we're disposed - DXBitmapSharedPtr pBitmap( - new DXBitmap( + DXBitmapSharedPtr pBitmap = std::make_shared<DXBitmap>( ::basegfx::unotools::b2ISizeFromIntegerSize2D(size), - true)); + true); // create a 32bit ARGB system memory surface return uno::Reference< rendering::XBitmap >(new CanvasBitmap(pBitmap,mpDevice)); |