From 43390c8642d575b2ebe02f9aae78d7350246119e Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 12 Mar 2021 15:53:54 +0100 Subject: convert to/from premultiplied alpha if needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A mistake from bf2ba0f39be62978b512d6ed101219b9dd0dc6e4. Change-Id: I8c732e8d79b376c9a5bb7b39c2562663e097db99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112396 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- vcl/skia/salbmp.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx index e8266f86990e..0fa95deb39db 100644 --- a/vcl/skia/salbmp.cxx +++ b/vcl/skia/salbmp.cxx @@ -1118,8 +1118,11 @@ void SkiaSalBitmap::EnsureBitmapData() #endif SkBitmap bitmap; SkPixmap pixmap; - if (mSize == mPixelsSize && mImage->peekPixels(&pixmap)) + if (mSize == mPixelsSize && mImage->imageInfo().alphaType() == alphaType + && mImage->peekPixels(&pixmap)) + { bitmap.installPixels(pixmap); + } else { if (!bitmap.tryAllocPixels(SkImageInfo::MakeS32(mSize.Width(), mSize.Height(), alphaType))) -- cgit