summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-08 14:57:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-08 14:57:47 +0000
commitbda113c645673fd152bb9ca3eaddd3c34920223e (patch)
tree88fecf69cce06392814627b5ac41c5b308de1b2b /core/fpdfapi
parent967aa0793c0b0cf2722ec8720e9d797266a9fde7 (diff)
downloadpdfium-bda113c645673fd152bb9ca3eaddd3c34920223e.tar.xz
Move CalculatePitch8() to core/fxcodec.
Use it in more places there. Change-Id: I477670a5946ec9033ad5f2bef0fbcddb52682066 Reviewed-on: https://pdfium-review.googlesource.com/31271 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp
index eb7acac62c..153491aa06 100644
--- a/core/fpdfapi/render/cpdf_dibsource.cpp
+++ b/core/fpdfapi/render/cpdf_dibsource.cpp
@@ -54,24 +54,6 @@ bool GetBitValue(const uint8_t* pSrc, uint32_t pos) {
return pSrc[pos / 8] & (1 << (7 - pos % 8));
}
-FX_SAFE_UINT32 CalculatePitch8(uint32_t bpc, uint32_t components, int width) {
- FX_SAFE_UINT32 pitch = bpc;
- pitch *= components;
- pitch *= width;
- pitch += 7;
- pitch /= 8;
- return pitch;
-}
-
-FX_SAFE_UINT32 CalculatePitch32(int bpp, int width) {
- FX_SAFE_UINT32 pitch = bpp;
- pitch *= width;
- pitch += 31;
- pitch /= 32; // quantized to number of 32-bit words.
- pitch *= 4; // and then back to bytes, (not just /8 in one step).
- return pitch;
-}
-
bool IsAllowedBPCValue(int bpc) {
return bpc == 1 || bpc == 2 || bpc == 4 || bpc == 8 || bpc == 16;
}