vcl/skia/gdiimpl.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 5acdb23a413ce82a279eb4fee0ddf867e989fec8
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Sep 29 19:33:08 2020 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Fri Oct 2 15:42:48 2020 +0200

    cache Skia bitmaps if they are small but to be scaled
    
    In raster mode this still may cost a bit, especially with code
    that paints the same bitmap repeatedly to create tiling.
    
    Change-Id: I0b65414b418f96a8b1620c8487562b61bd87c221
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103783
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index b6ffda221424..e194ba964c58 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1491,9 +1491,8 @@ sk_sp<SkImage> 
SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
     // Probably not much point in caching of just doing a copy.
     if (alphaBitmap == nullptr && targetSize == bitmap.GetSize())
         return image;
-    // Image too small to be worth caching.
-    if (bitmap.GetSize().Width() < 100 && bitmap.GetSize().Height() < 100
-        && targetSize.Width() < 100 && targetSize.Height() < 100)
+    // Image too small to be worth caching if not scaling.
+    if (targetSize == bitmap.GetSize() && targetSize.Width() < 100 && 
targetSize.Height() < 100)
         return image;
     // In some cases (tdf#134237) the target size may be very large. In that 
case it's
     // better to rely on Skia to clip and draw only the necessary, rather than 
prepare
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to