[Libreoffice-commits] core.git: vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 19 09:38:42 UTC 2021
vcl/skia/salbmp.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit bba3afbd5e5ad65375e832a0e3174fe70d42a6e5
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Feb 5 20:05:17 2021 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Feb 19 10:38:03 2021 +0100
write color components properly in debug output
They are sal_uInt8, which is technically unsigned char, and those
are normally written as chars, not as numbers.
Change-Id: I63d81ce270f95d06f1641eea3b2231a12a8aea2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111124
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 70405e2b5111..e89a824f0d84 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -1229,8 +1229,9 @@ OString SkiaSalBitmap::GetImageKey() const
if (mEraseColorSet)
{
std::stringstream ss;
- ss << std::hex << std::setfill('0') << std::setw(2) << mEraseColor.GetAlpha()
- << std::setw(6) << sal_uInt32(mEraseColor.GetRGBColor());
+ ss << std::hex << std::setfill('0') << std::setw(6)
+ << static_cast<sal_uInt32>(mEraseColor.GetRGBColor()) << std::setw(2)
+ << static_cast<int>(mEraseColor.GetAlpha());
return OStringLiteral("E") + ss.str().c_str();
}
return OStringLiteral("I") + OString::number(GetSkImage()->uniqueID());
@@ -1242,7 +1243,7 @@ OString SkiaSalBitmap::GetAlphaImageKey() const
{
std::stringstream ss;
ss << std::hex << std::setfill('0') << std::setw(2)
- << (255 - SkColorGetA(fromEraseColorToAlphaImageColor(mEraseColor)));
+ << static_cast<int>(255 - SkColorGetA(fromEraseColorToAlphaImageColor(mEraseColor)));
return OStringLiteral("E") + ss.str().c_str();
}
return OStringLiteral("I") + OString::number(GetAlphaSkImage()->uniqueID());
More information about the Libreoffice-commits
mailing list