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

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

Issue 2060973002: Make code compile with clang_use_chrome_plugin (part I) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 months 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
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class CPDF_Type3Cache; 43 class CPDF_Type3Cache;
44 class CPDF_Type3Char; 44 class CPDF_Type3Char;
45 class CPDF_Type3Font; 45 class CPDF_Type3Font;
46 46
47 #define TYPE3_MAX_BLUES 16 47 #define TYPE3_MAX_BLUES 16
48 48
49 FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix); 49 FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix);
50 50
51 class CPDF_Type3Glyphs { 51 class CPDF_Type3Glyphs {
52 public: 52 public:
53 CPDF_Type3Glyphs() : m_TopBlueCount(0), m_BottomBlueCount(0) {} 53 CPDF_Type3Glyphs();
54 ~CPDF_Type3Glyphs(); 54 ~CPDF_Type3Glyphs();
55
55 void AdjustBlue(FX_FLOAT top, 56 void AdjustBlue(FX_FLOAT top,
56 FX_FLOAT bottom, 57 FX_FLOAT bottom,
57 int& top_line, 58 int& top_line,
58 int& bottom_line); 59 int& bottom_line);
59 60
60 std::map<uint32_t, CFX_GlyphBitmap*> m_GlyphMap; 61 std::map<uint32_t, CFX_GlyphBitmap*> m_GlyphMap;
61 int m_TopBlue[TYPE3_MAX_BLUES]; 62 int m_TopBlue[TYPE3_MAX_BLUES];
62 int m_BottomBlue[TYPE3_MAX_BLUES]; 63 int m_BottomBlue[TYPE3_MAX_BLUES];
63 int m_TopBlueCount; 64 int m_TopBlueCount;
64 int m_BottomBlueCount; 65 int m_BottomBlueCount;
65 }; 66 };
67
66 class CPDF_Type3Cache { 68 class CPDF_Type3Cache {
67 public: 69 public:
68 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont) : m_pFont(pFont) {} 70 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont);
69 ~CPDF_Type3Cache(); 71 ~CPDF_Type3Cache();
70 72
71 CFX_GlyphBitmap* LoadGlyph(uint32_t charcode, 73 CFX_GlyphBitmap* LoadGlyph(uint32_t charcode,
72 const CFX_Matrix* pMatrix, 74 const CFX_Matrix* pMatrix,
73 FX_FLOAT retinaScaleX = 1.0f, 75 FX_FLOAT retinaScaleX = 1.0f,
74 FX_FLOAT retinaScaleY = 1.0f); 76 FX_FLOAT retinaScaleY = 1.0f);
75 77
76 protected: 78 protected:
77 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, 79 CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize,
78 uint32_t charcode, 80 uint32_t charcode,
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 void* m_pJbig2Context; 600 void* m_pJbig2Context;
599 CPDF_DIBSource* m_pMask; 601 CPDF_DIBSource* m_pMask;
600 std::unique_ptr<CPDF_StreamAcc> m_pGlobalStream; 602 std::unique_ptr<CPDF_StreamAcc> m_pGlobalStream;
601 CPDF_Stream* m_pMaskStream; 603 CPDF_Stream* m_pMaskStream;
602 int m_Status; 604 int m_Status;
603 }; 605 };
604 606
605 #define FPDF_HUGE_IMAGE_SIZE 60000000 607 #define FPDF_HUGE_IMAGE_SIZE 60000000
606 class CPDF_DIBTransferFunc : public CFX_FilteredDIB { 608 class CPDF_DIBTransferFunc : public CFX_FilteredDIB {
607 public: 609 public:
608 CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); 610 explicit CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc);
609 ~CPDF_DIBTransferFunc() override; 611 ~CPDF_DIBTransferFunc() override;
610 612
611 // CFX_FilteredDIB 613 // CFX_FilteredDIB
612 FXDIB_Format GetDestFormat() override; 614 FXDIB_Format GetDestFormat() override;
613 FX_ARGB* GetDestPalette() override { return nullptr; } 615 FX_ARGB* GetDestPalette() override;
614 void TranslateScanline(uint8_t* dest_buf, 616 void TranslateScanline(uint8_t* dest_buf,
615 const uint8_t* src_buf) const override; 617 const uint8_t* src_buf) const override;
616 void TranslateDownSamples(uint8_t* dest_buf, 618 void TranslateDownSamples(uint8_t* dest_buf,
617 const uint8_t* src_buf, 619 const uint8_t* src_buf,
618 int pixels, 620 int pixels,
619 int Bpp) const override; 621 int Bpp) const override;
620 622
621 const uint8_t* m_RampR; 623 const uint8_t* m_RampR;
622 const uint8_t* m_RampG; 624 const uint8_t* m_RampG;
623 const uint8_t* m_RampB; 625 const uint8_t* m_RampB;
624 }; 626 };
625 627
626 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 628 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698