summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap/bitmappalette.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-10-27 11:18:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-10-27 22:03:24 +0200
commit1d86a0b632813efb2259b795b272f8aa40a7c768 (patch)
treeb9c330e4de7e3840a2754a473f606e29dfdc99fb /vcl/source/bitmap/bitmappalette.cxx
parent9b5a00d2281bebaac5fccfde17de6ca5134fc229 (diff)
tdf#152571 speedup slow draw file save
with lots of images, we seem to spend lots of time calculating CRC. Replace the vcl checksum/CRC with rtl_crc32 in sal/, which forwards to the zlib implementation, which has all kinds of nice SIMD code for performance. Change-Id: I295e2ee91b3450fa558b06e67aac0fbb20b85f52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/bitmap/bitmappalette.cxx')
-rw-r--r--vcl/source/bitmap/bitmappalette.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/bitmap/bitmappalette.cxx b/vcl/source/bitmap/bitmappalette.cxx
index e0bf53db033e..97bfe4a62051 100644
--- a/vcl/source/bitmap/bitmappalette.cxx
+++ b/vcl/source/bitmap/bitmappalette.cxx
@@ -21,6 +21,7 @@
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <rtl/crc.h>
#include <tools/helpers.hxx>
#include <vcl/BitmapPalette.hxx>
@@ -120,7 +121,7 @@ BitmapColor* BitmapPalette::ImplGetColorBuffer() { return mpImpl->GetBitmapData(
BitmapChecksum BitmapPalette::GetChecksum() const
{
auto const& rBitmapData = mpImpl->GetBitmapData();
- return vcl_get_checksum(0, rBitmapData.data(), rBitmapData.size() * sizeof(BitmapColor));
+ return rtl_crc32(0, rBitmapData.data(), rBitmapData.size() * sizeof(BitmapColor));
}
bool BitmapPalette::operator==(const BitmapPalette& rOther) const