[Libreoffice-commits] core.git: Branch 'feature/skia' - 2 commits - vcl/skia vcl/source
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 24 10:38:17 UTC 2019
vcl/skia/gdiimpl.cxx | 4 ++--
vcl/source/bitmap/salbmp.cxx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ab7d32e4cc8b4ea5dfa6739994772a4c0fe02d2d
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Oct 24 12:34:14 2019 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Oct 24 12:37:12 2019 +0200
fix alpha in SkiaSalGraphicsImpl::drawAlphaBitmap()
The mistake in SalBitmap::convertDataBitCount() made this function
have 2 different results depending on whether that function was
used by GetAlphaSkBitmap() or not. Now that that is fixed, it
works to just handle alpha normally here.
Change-Id: Iae99cbefcda0a963401baf362faaad0df12a468f
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 5d6acd5150f1..5fd44115cb44 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -797,10 +797,10 @@ bool SkiaSalGraphicsImpl::drawAlphaBitmap(const SalTwoRect& rPosAry, const SalBi
SkCanvas canvas(tmpBitmap);
SkPaint paint;
paint.setBlendMode(SkBlendMode::kSrc); // copy as is, including alpha
+ canvas.drawBitmap(static_cast<const SkiaSalBitmap&>(rSourceBitmap).GetSkBitmap(), 0, 0, &paint);
+ paint.setBlendMode(SkBlendMode::kDstOut);
canvas.drawBitmap(static_cast<const SkiaSalBitmap&>(rAlphaBitmap).GetAlphaSkBitmap(), 0, 0,
&paint);
- paint.setBlendMode(SkBlendMode::kSrcIn);
- canvas.drawBitmap(static_cast<const SkiaSalBitmap&>(rSourceBitmap).GetSkBitmap(), 0, 0, &paint);
drawBitmap(rPosAry, tmpBitmap);
return true;
}
commit 89872470b368ba0db062c5a1b0d4643b58c7ecc9
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Oct 24 12:33:15 2019 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Oct 24 12:37:09 2019 +0200
fix alpha conversion in SalBitmap::convertDataBitCount()
VCL sometimes uses inversed alpha, but this function should always
just convert the format and not the contents.
Change-Id: I85943cb8d9db6c09c57ccf8fa45e8a591db10e6d
diff --git a/vcl/source/bitmap/salbmp.cxx b/vcl/source/bitmap/salbmp.cxx
index 59ff8ef2e5ec..28a46ccc262b 100644
--- a/vcl/source/bitmap/salbmp.cxx
+++ b/vcl/source/bitmap/salbmp.cxx
@@ -166,7 +166,7 @@ std::unique_ptr< sal_uInt8[] > SalBitmap::convertDataBitCount( const sal_uInt8*
while( nX-- )
{
const BitmapColor& c = pSrcFormat->ReadPixel();
- *pDstData++ = 0xff - c.GetBlue();
+ *pDstData++ = c.GetBlue();
}
break;
case BitConvert::BGR :
More information about the Libreoffice-commits
mailing list