summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-06-05 17:50:01 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-05 17:50:01 +0000
commit22de733a693f27c90f58ee13cfd398c55d9a064f (patch)
treeb3bdbe89110543d15819c94d39a205ef5118704a
parent799468b2917eab7ea5752b7db6b9ace9da96f4c3 (diff)
downloadpdfium-22de733a693f27c90f58ee13cfd398c55d9a064f.tar.xz
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 <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
-rw-r--r--core/fxcodec/codec/fx_codec_fax.cpp5
1 files 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<uint32_t*>(m_ScanlineBuf.data());
+ for (size_t i = 0; i < m_ScanlineBuf.size() / 4; ++i)
data[i] = ~data[i];
}
return m_ScanlineBuf.data();