[Libreoffice-commits] core.git: vcl/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 7 19:25:05 UTC 2021
vcl/source/bitmap/bitmap.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit f1a57c38681eda897e42ae0358556f4d55e45dad
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Tue Apr 6 13:38:11 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Apr 7 21:24:17 2021 +0200
can short-circuit this conversion
Change-Id: I042bcd0ea9d64ab5d9cca301a04235a89b1e4fbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113662
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index 656e9bd15528..7bf272225d6c 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -945,6 +945,8 @@ bool Bitmap::Convert( BmpConversion eConversion )
// avoid large chunk of obsolete and hopefully rarely used conversions.
if (eConversion == BmpConversion::N8BitNoConversion)
{
+ if (mxSalBmp->GetBitCount() == 8 && HasGreyPalette8Bit())
+ return true;
std::shared_ptr<SalBitmap> xImpBmp(ImplGetSVData()->mpDefInst->CreateSalBitmap());
// frequently used conversion for creating alpha masks
if (xImpBmp->Create(*mxSalBmp) && xImpBmp->InterpretAs8Bit())
More information about the Libreoffice-commits
mailing list