diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-01 10:34:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-02 09:07:15 +0100 |
commit | c4228a798ef63ea6d3a2e822cd8d1cccf46837af (patch) | |
tree | de5d5bc93d72e74af743bf06c4ee3fcb6b4bfe78 /vcl/headless/BitmapHelper.cxx | |
parent | dfe551c816fcaf6f3d3ad9da6da5472900cf17d0 (diff) |
pass BitmapBuffer around by std::optional
instead of allocating on the heap, it is small
Change-Id: I79eec6605a04c09d9a984cd1a719affb5b06dff3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160195
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/headless/BitmapHelper.cxx')
-rw-r--r-- | vcl/headless/BitmapHelper.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/headless/BitmapHelper.cxx b/vcl/headless/BitmapHelper.cxx index 8ed0cac09fcb..2cdf502fc9f2 100644 --- a/vcl/headless/BitmapHelper.cxx +++ b/vcl/headless/BitmapHelper.cxx @@ -38,7 +38,7 @@ BitmapHelper::BitmapHelper(const SalBitmap& rSourceBitmap, const bool bForceARGB const BitmapBuffer* pSrc = rSrcBmp.GetBuffer(); const SalTwoRect aTwoRect = { 0, 0, pSrc->mnWidth, pSrc->mnHeight, 0, 0, pSrc->mnWidth, pSrc->mnHeight }; - std::unique_ptr<BitmapBuffer> pTmp + std::optional<BitmapBuffer> pTmp = (pSrc->mnFormat == SVP_24BIT_FORMAT ? FastConvert24BitRgbTo32BitCairo(pSrc) : StretchAndConvert(*pSrc, aTwoRect, SVP_CAIRO_FORMAT)); |