summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-03-30 13:36:45 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-30 13:36:45 -0700
commitd734fd2f60c68a4cfa0e5bb8ff85d357605d3449 (patch)
treee77a006a6c4044361133fbfb2b18181a48670fd9 /core/fpdfapi
parent04fd27b3742ace6e76d70e19ca7a4ff178c4cdc5 (diff)
downloadpdfium-d734fd2f60c68a4cfa0e5bb8ff85d357605d3449.tar.xz
Rename _CPDF_UniqueKeyGen to CPDF_UniqueKeyGen
Review URL: https://codereview.chromium.org/1841313004
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_text.cpp34
-rw-r--r--core/fpdfapi/fpdf_render/render_int.h6
2 files changed, 23 insertions, 17 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index c38362fb70..0165e8a7d7 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -23,6 +23,27 @@
#include "core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h"
#include "core/include/fxge/fx_ge.h"
+namespace {
+
+struct CPDF_UniqueKeyGen {
+ void Generate(int count, ...);
+ FX_CHAR m_Key[128];
+ int m_KeyLen;
+};
+
+void CPDF_UniqueKeyGen::Generate(int count, ...) {
+ va_list argList;
+ va_start(argList, count);
+ for (int i = 0; i < count; i++) {
+ int p = va_arg(argList, int);
+ ((uint32_t*)m_Key)[i] = p;
+ }
+ va_end(argList);
+ m_KeyLen = count * sizeof(uint32_t);
+}
+
+} // namespace
+
CPDF_Type3Cache::~CPDF_Type3Cache() {
for (const auto& pair : m_SizeMap) {
delete pair.second;
@@ -33,7 +54,7 @@ CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(uint32_t charcode,
const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX,
FX_FLOAT retinaScaleY) {
- _CPDF_UniqueKeyGen keygen;
+ CPDF_UniqueKeyGen keygen;
keygen.Generate(
4, FXSYS_round(pMatrix->a * 10000), FXSYS_round(pMatrix->b * 10000),
FXSYS_round(pMatrix->c * 10000), FXSYS_round(pMatrix->d * 10000));
@@ -187,16 +208,7 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize,
delete pResBitmap;
return pGlyph;
}
-void _CPDF_UniqueKeyGen::Generate(int count, ...) {
- va_list argList;
- va_start(argList, count);
- for (int i = 0; i < count; i++) {
- int p = va_arg(argList, int);
- ((uint32_t*)m_Key)[i] = p;
- }
- va_end(argList);
- m_KeyLen = count * sizeof(uint32_t);
-}
+
FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
const CFX_Matrix* pObj2Device,
CFX_PathData* pClippingPath) {
diff --git a/core/fpdfapi/fpdf_render/render_int.h b/core/fpdfapi/fpdf_render/render_int.h
index a3b8d76fe7..b22b9fc39b 100644
--- a/core/fpdfapi/fpdf_render/render_int.h
+++ b/core/fpdfapi/fpdf_render/render_int.h
@@ -636,10 +636,4 @@ class CPDF_DIBTransferFunc : public CFX_FilteredDIB {
const uint8_t* m_RampB;
};
-struct _CPDF_UniqueKeyGen {
- void Generate(int count, ...);
- FX_CHAR m_Key[128];
- int m_KeyLen;
-};
-
#endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_