diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-03-12 15:53:54 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-03-12 22:28:27 +0100 |
commit | 43390c8642d575b2ebe02f9aae78d7350246119e (patch) | |
tree | be801ed21dcccd498cfa17068e6e99c160966f9a /vcl | |
parent | 3ee6dcfacf283af71bce93423be43d1dcbb2c12e (diff) |
convert to/from premultiplied alpha if needed
A mistake from bf2ba0f39be62978b512d6ed101219b9dd0dc6e4.
Change-Id: I8c732e8d79b376c9a5bb7b39c2562663e097db99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112396
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/skia/salbmp.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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))) |