vcl/source/bitmap/bitmap.cxx | 2 ++ 1 file changed, 2 insertions(+) New commits: commit f1a57c38681eda897e42ae0358556f4d55e45dad Author: Noel <noel.gran...@collabora.co.uk> AuthorDate: Tue Apr 6 13:38:11 2021 +0200 Commit: Noel Grandin <noel.gran...@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.gran...@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()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits