summaryrefslogtreecommitdiff
path: root/canvas/source/directx/dx_surfacebitmap.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-03 16:26:38 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-03 23:38:37 +0100
commit6317e10f5b9c347ceb391e049e6d0f3c542f93c4 (patch)
tree5552a3ccc88bfbdf932735292a008271ab4360fa /canvas/source/directx/dx_surfacebitmap.cxx
parenta334f77792dfff92e3c97f7f61f59d01fc9338cf (diff)
loplugin:makeshared (clang-cl)
Change-Id: I0c786bf401e514f9d86e33d8ab6366fc5dd1f425 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87887 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source/directx/dx_surfacebitmap.cxx')
-rw-r--r--canvas/source/directx/dx_surfacebitmap.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/canvas/source/directx/dx_surfacebitmap.cxx b/canvas/source/directx/dx_surfacebitmap.cxx
index 4fcdcba66d1f..7ca1596bcc96 100644
--- a/canvas/source/directx/dx_surfacebitmap.cxx
+++ b/canvas/source/directx/dx_surfacebitmap.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
+#include <memory>
#include <string.h>
#include <com/sun/star/rendering/ColorComponentTag.hpp>
@@ -222,19 +223,18 @@ namespace dxcanvas
// create container for pixel data
if(mbAlpha)
{
- mpGDIPlusBitmap.reset(
- new Gdiplus::Bitmap(
+ mpGDIPlusBitmap = std::make_shared<Gdiplus::Bitmap>(
maSize.getX(),
maSize.getY(),
PixelFormat32bppARGB
- ));
+ );
mpGraphics.reset( tools::createGraphicsFromBitmap(mpGDIPlusBitmap) );
// create the colorbuffer object, which is basically a simple
// wrapper around the directx surface. the colorbuffer is the
// interface which is used by the surfaceproxy to support any
// kind of underlying structure for the pixel data container.
- mpColorBuffer.reset(new GDIColorBuffer(mpGDIPlusBitmap,maSize));
+ mpColorBuffer = std::make_shared<GDIColorBuffer>(mpGDIPlusBitmap,maSize);
}
else
{
@@ -244,7 +244,7 @@ namespace dxcanvas
// wrapper around the directx surface. the colorbuffer is the
// interface which is used by the surfaceproxy to support any
// kind of underlying structure for the pixel data container.
- mpColorBuffer.reset(new DXColorBuffer(mpSurface,maSize));
+ mpColorBuffer = std::make_shared<DXColorBuffer>(mpSurface,maSize);
}
// create a (possibly hardware accelerated) mirror surface.
@@ -324,10 +324,10 @@ namespace dxcanvas
Gdiplus::PixelFormat nFormat = hasAlpha() ? PixelFormat32bppARGB : PixelFormat32bppRGB;
// construct a gdi+ bitmap from the raw pixel data.
- pResult.reset(new Gdiplus::Bitmap( maSize.getX(),maSize.getY(),
+ pResult = std::make_shared<Gdiplus::Bitmap>( maSize.getX(),maSize.getY(),
aLockedRect.Pitch,
nFormat,
- static_cast<BYTE *>(aLockedRect.pBits) ));
+ static_cast<BYTE *>(aLockedRect.pBits) );
mpSurface->UnlockRect();
}