include/vcl/outdev.hxx | 2 +- vcl/source/outdev/bitmap.cxx | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-)
New commits: commit 45e1e63cce018e2e21a67c0ded4122ef0a5c599f Author: Christopher Sherlock <chris.sherloc...@gmail.com> AuthorDate: Sat Aug 2 17:29:22 2025 +1000 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Aug 16 09:30:18 2025 +0200 vcl: make destination rect param const in DrawDeviceAlphaBitmapSlowPath() Change-Id: I3e8811a56abd20ab5b3eed72347c43be7d4de00d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 4e75a66e3c9d..01c9b6923088 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1463,7 +1463,7 @@ private: SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath( const Bitmap& rBitmap, const AlphaMask& rAlpha, - tools::Rectangle aDstRect, tools::Rectangle aBmpRect, + const tools::Rectangle& rDstRect, tools::Rectangle aBmpRect, Size const & aOutSz, Point const & aOutPt); ///@} diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 7b38a29a6e9a..745cf520decb 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -480,7 +480,7 @@ Bitmap lcl_BlendBitmapWithAlpha( } // end anonymous namespace void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, - const AlphaMask& rAlpha, tools::Rectangle aDstRect, tools::Rectangle aBmpRect, Size const & aOutSize, Point const & aOutPoint) + const AlphaMask& rAlpha, const tools::Rectangle& rDstRect, tools::Rectangle aBmpRect, Size const & aOutSize, Point const & aOutPoint) { assert(!is_double_buffered_window()); @@ -492,7 +492,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, mpMetaFile = nullptr; // fdo#55044 reset before GetBitmap! mbMap = false; - Bitmap aDeviceBmp(GetBitmap(aDstRect.TopLeft(), aDstRect.GetSize())); + Bitmap aDeviceBmp(GetBitmap(rDstRect.TopLeft(), rDstRect.GetSize())); // #109044# The generated bitmap need not necessarily be // of aDstRect dimensions, it's internally clipped to @@ -500,10 +500,11 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, // since we later use it (in nDstWidth/Height) for pixel // access) // #i38887# reading from screen may sometimes fail + + tools::Rectangle aDstRect(rDstRect); + if (aDeviceBmp.ImplGetSalBitmap()) - { aDstRect.SetSize(aDeviceBmp.GetSizePixel()); - } // calculate offset in original bitmap // in RTL case this is a little more complicated since the contents of the