diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-12-07 18:52:29 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-01-07 10:01:12 +0100 |
commit | 2692dc5f662c74e3df63224ae829fc492503aa1e (patch) | |
tree | 0097faa76d11dca58be4ae9b7af5df58fa3bfd7f | |
parent | c4b83dc2c4b8d4ea4b664b34309fbf0cf2fd8ad1 (diff) |
save alpha channel processing when not needed
Change-Id: Icbf19e86b833c0cec08a9ac5c41c01fd2dd1a4e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128060
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | vcl/skia/salbmp.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx index b81e55221f34..df3536b4de91 100644 --- a/vcl/skia/salbmp.cxx +++ b/vcl/skia/salbmp.cxx @@ -602,7 +602,8 @@ bool SkiaSalBitmap::AlphaBlendWith(const SalBitmap& rSalBmp) return false; otherBitmap = otherBitmapAllocated.get(); } - sk_sp<SkSurface> surface = createSkSurface(mSize); + // This is 8-bit bitmap serving as mask, so the image itself needs no alpha. + sk_sp<SkSurface> surface = createSkSurface(mSize, kOpaque_SkAlphaType); SkPaint paint; paint.setBlendMode(SkBlendMode::kSrc); // set as is surface->getCanvas()->drawImage(GetSkImage(), 0, 0, SkSamplingOptions(), &paint); |