summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-20 11:50:06 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-20 11:50:06 -0700
commit1b99b2dcde9d8bf1a5944a7e0dac81ca33459af5 (patch)
tree50ce9fbd5fadac593fc0af976de6841e55e22fdf /core/fpdfapi/fpdf_page
parent3cbb6fbcc7077d94161ec95b7bc1421671317c65 (diff)
downloadpdfium-1b99b2dcde9d8bf1a5944a7e0dac81ca33459af5.tar.xz
Merge GetBits32() impls into one. Put it in fxcrt.
Review-Url: https://codereview.chromium.org/1990153003
Diffstat (limited to 'core/fpdfapi/fpdf_page')
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_func.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp
index c9b0ea236e..bb1d631576 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -8,6 +8,7 @@
#include <limits.h>
+#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
@@ -504,15 +505,6 @@ FX_FLOAT PDF_Interpolate(FX_FLOAT x,
return ymin + (divisor ? (x - xmin) * (ymax - ymin) / divisor : 0);
}
-uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits) {
- int result = 0;
- for (int i = 0; i < nbits; i++) {
- if (pData[(bitpos + i) / 8] & (1 << (7 - (bitpos + i) % 8)))
- result |= 1 << (nbits - i - 1);
- }
- return result;
-}
-
class CPDF_PSFunc : public CPDF_Function {
public:
CPDF_PSFunc() : CPDF_Function(Type::kType4PostScript) {}