vcl/source/outdev/bitmap.cxx | 2 ++ 1 file changed, 2 insertions(+) New commits: commit af34f4ea62d8aabbab5d4028034aa2482c16fe8a Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Jul 6 10:52:07 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Jul 6 14:29:00 2023 +0200
avoid skia assert and slow-path Otherwise, several lines below, we might call mpAlphaVDev->GetBitmap which will return no bitmap (because the resulting bitmap would be empty). And then either we will hit the assert a few lines lower, or we will go into the very very slow path below. Change-Id: I41a62cddef5e0a6822ca09ed954e3fe431ca0021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 8e453e835904..239ec93e202b 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -315,6 +315,8 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r if (aDstRect.Intersection(tools::Rectangle(aOutPt, aOutSz)).IsEmpty()) return; + if (ImplLogicToDevicePixel(aOutSz).IsEmpty()) // nothing to draw + return; { Point aRelPt = aOutPt + Point(mnOutOffX, mnOutOffY);