Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: core/src/fpdfapi/fpdf_render/render_int.h

Issue 1520643002: Replace several more CFX_MapPtrToPtr with std::set or std::map (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 7 #ifndef CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 8 #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
9 9
10 #include <map> 10 #include <map>
11 11
12 #include "core/include/fpdfapi/fpdf_pageobj.h" 12 #include "core/include/fpdfapi/fpdf_pageobj.h"
13 #include "core/include/fpdfapi/fpdf_render.h" 13 #include "core/include/fpdfapi/fpdf_render.h"
14 #include "third_party/base/nonstd_unique_ptr.h" 14 #include "third_party/base/nonstd_unique_ptr.h"
15 15
16 class CFX_GlyphBitmap; 16 class CFX_GlyphBitmap;
17 class CPDF_ImageCache; 17 class CPDF_ImageCache;
18 class CPDF_QuickStretcher; 18 class CPDF_QuickStretcher;
19 19
20 #define TYPE3_MAX_BLUES 16 20 #define TYPE3_MAX_BLUES 16
21 21
22 class CPDF_Type3Glyphs { 22 class CPDF_Type3Glyphs {
23 public: 23 public:
24 CPDF_Type3Glyphs() { 24 CPDF_Type3Glyphs() : m_TopBlueCount(0), m_BottomBlueCount(0) {}
25 m_GlyphMap.InitHashTable(253);
26 m_TopBlueCount = m_BottomBlueCount = 0;
27 }
28 ~CPDF_Type3Glyphs(); 25 ~CPDF_Type3Glyphs();
29 CFX_MapPtrToPtr m_GlyphMap;
30 void AdjustBlue(FX_FLOAT top, 26 void AdjustBlue(FX_FLOAT top,
31 FX_FLOAT bottom, 27 FX_FLOAT bottom,
32 int& top_line, 28 int& top_line,
33 int& bottom_line); 29 int& bottom_line);
34 30
35 int m_TopBlue[TYPE3_MAX_BLUES], m_BottomBlue[TYPE3_MAX_BLUES]; 31 std::map<FX_DWORD, CFX_GlyphBitmap*> m_GlyphMap;
36 int m_TopBlueCount, m_BottomBlueCount; 32 int m_TopBlue[TYPE3_MAX_BLUES];
33 int m_BottomBlue[TYPE3_MAX_BLUES];
34 int m_TopBlueCount;
35 int m_BottomBlueCount;
37 }; 36 };
38 class CPDF_Type3Cache { 37 class CPDF_Type3Cache {
39 public: 38 public:
40 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} 39 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {}
41 ~CPDF_Type3Cache(); 40 ~CPDF_Type3Cache();
42 41
43 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode, 42 CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode,
44 const CFX_AffineMatrix* pMatrix, 43 const CFX_AffineMatrix* pMatrix,
45 FX_FLOAT retinaScaleX = 1.0f, 44 FX_FLOAT retinaScaleX = 1.0f,
46 FX_FLOAT retinaScaleY = 1.0f); 45 FX_FLOAT retinaScaleY = 1.0f);
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 const uint8_t* m_RampB; 644 const uint8_t* m_RampB;
646 }; 645 };
647 646
648 struct _CPDF_UniqueKeyGen { 647 struct _CPDF_UniqueKeyGen {
649 void Generate(int count, ...); 648 void Generate(int count, ...);
650 FX_CHAR m_Key[128]; 649 FX_CHAR m_Key[128];
651 int m_KeyLen; 650 int m_KeyLen;
652 }; 651 };
653 652
654 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 653 #endif // CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698