diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-15 12:43:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-15 14:33:52 +0100 |
commit | 52fece12345161911da2a531213b7d5541192aad (patch) | |
tree | fd27e700dc56ca5293e88746dbeed7cc08a57f3a /slideshow | |
parent | 0a76eb059a77c799e6ce8400c558fc4dd1d866aa (diff) |
tweak GetBitmap methods in BitmapEx
so we return a const& for the normal case, just like other methods,
which reduces copying.
This revealed that CreateDisplayBitmap in Bitmap can be const.
Change-Id: I9f9b9ff0c52d7e95eaae62af152218be8847dd63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/shapes/gdimtftools.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 19ea3d4f51b7..2a7bb51a4ae8 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -315,14 +315,14 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, { // #i70772# react on no mask const Bitmap aMask(rAnimationBitmap.maBitmapEx.GetMask()); - const Bitmap aContent(rAnimationBitmap.maBitmapEx.GetBitmap()); + const Bitmap & rContent(rAnimationBitmap.maBitmapEx.GetBitmap()); pVDevMask->Erase(); - pVDev->DrawBitmap(rAnimationBitmap.maPositionPixel, aContent); + pVDev->DrawBitmap(rAnimationBitmap.maPositionPixel, rContent); if(aMask.IsEmpty()) { - const tools::Rectangle aRect(rAnimationBitmap.maPositionPixel, aContent.GetSizePixel()); + const tools::Rectangle aRect(rAnimationBitmap.maPositionPixel, rContent.GetSizePixel()); pVDevMask->SetFillColor( COL_BLACK); pVDevMask->SetLineColor(); pVDevMask->DrawRect(aRect); |