summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/skia/SkiaHelper.cxx3
-rw-r--r--vcl/skia/gdiimpl.cxx8
2 files changed, 9 insertions, 2 deletions
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index aab6560b2554..3331cb7cb2b4 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -489,7 +489,8 @@ sk_sp<SkImage> findCachedImage(const OString& key)
if (it->key == key)
{
sk_sp<SkImage> ret = it->image;
- SAL_INFO("vcl.skia.trace", "findcachedimage " << it->image << " found");
+ SAL_INFO("vcl.skia.trace",
+ "findcachedimage " << key << " : " << it->image << " found");
imageCache->splice(imageCache->begin(), *imageCache, it);
return ret;
}
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index fdb1efc2d55f..051243ad2a8d 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1276,7 +1276,10 @@ static sk_sp<SkImage> mergeBitmaps(const SkiaSalBitmap& bitmap, const SkiaSalBit
if (!blockCaching)
{
OStringBuffer keyBuf;
- keyBuf.append("0x")
+ keyBuf.append(targetSize.Width())
+ .append("x")
+ .append(targetSize.Height())
+ .append("_0x")
.append(reinterpret_cast<sal_IntPtr>(&bitmap), 16)
.append("_0x")
.append(reinterpret_cast<sal_IntPtr>(alphaBitmap), 16)
@@ -1288,7 +1291,10 @@ static sk_sp<SkImage> mergeBitmaps(const SkiaSalBitmap& bitmap, const SkiaSalBit
key = keyBuf.makeStringAndClear();
image = SkiaHelper::findCachedImage(key);
if (image)
+ {
+ assert(image->width() == targetSize.Width() && image->height() == targetSize.Height());
return image;
+ }
}
// Combine bitmap + alpha bitmap into one temporary bitmap with alpha.
// If scaling is needed, first apply the alpha, then scale, otherwise the scaling might affect the alpha values.