From 22de733a693f27c90f58ee13cfd398c55d9a064f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 5 Jun 2018 17:50:01 +0000 Subject: Further improve CCodec_FaxDecoder performance in debug builds. BUG=chromium:845117 Change-Id: Id1c97bc40ff776f52011a8ab2d6e5166cd7c64c8 Reviewed-on: https://pdfium-review.googlesource.com/33650 Reviewed-by: Henrique Nakashima Commit-Queue: Lei Zhang --- core/fxcodec/codec/fx_codec_fax.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp index 0a6ba3a793..2c85e2dc8b 100644 --- a/core/fxcodec/codec/fx_codec_fax.cpp +++ b/core/fxcodec/codec/fx_codec_fax.cpp @@ -545,8 +545,9 @@ uint8_t* CCodec_FaxDecoder::v_GetNextLine() { } if (m_bBlack) { ASSERT(m_Pitch == m_ScanlineBuf.size()); - uint8_t* data = m_ScanlineBuf.data(); - for (size_t i = 0; i < m_ScanlineBuf.size(); ++i) + ASSERT(m_Pitch % 4 == 0); + uint32_t* data = reinterpret_cast(m_ScanlineBuf.data()); + for (size_t i = 0; i < m_ScanlineBuf.size() / 4; ++i) data[i] = ~data[i]; } return m_ScanlineBuf.data(); -- cgit v1.2.3