vcl/source/outdev/bitmap.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit f28087140a79949b7ba38cd9a724438ea92a44e8
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Sep 13 10:47:06 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Tue Sep 13 17:17:29 2022 +0200

    do not assert on "failed" Skia call because of empty size (tdf#150821)
    
    There's no problem if the output size is actually empty.
    
    Change-Id: I680766919c65fcaad6687f09af28f6e95575c228
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139830
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 53a9f774b71d..f489efd7a038 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -347,7 +347,11 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& 
rBmp, const AlphaMask& r
         }
 
         // we need to make sure Skia never reaches this slow code path
-        assert(!SkiaHelper::isVCLSkiaEnabled());
+        // (but do not fail in no-op cases)
+        assert(!SkiaHelper::isVCLSkiaEnabled()
+            || tools::Rectangle(Point(), rBmp.GetSizePixel())
+                .Intersection(tools::Rectangle(rSrcPtPixel, 
rSrcSizePixel)).IsEmpty()
+            || 
mpAlphaVDev->LogicToPixel(mpAlphaVDev->GetOutputSizePixel()).IsEmpty());
     }
 
     tools::Rectangle aBmpRect(Point(), rBmp.GetSizePixel());

Reply via email to