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

Side by Side Diff: core/fpdfapi/page/cpdf_psengine.h

Issue 2477443002: Remove FX_BOOL from core (Closed)
Patch Set: Created 4 years, 1 month 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/page/cpdf_pathobject.h ('k') | core/fpdfapi/page/cpdf_shadingpattern.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_PAGE_CPDF_PSENGINE_H_ 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_
8 #define CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ 8 #define CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 PSOP_CONST 63 PSOP_CONST
64 }; 64 };
65 65
66 constexpr uint32_t PSENGINE_STACKSIZE = 100; 66 constexpr uint32_t PSENGINE_STACKSIZE = 100;
67 67
68 class CPDF_PSProc { 68 class CPDF_PSProc {
69 public: 69 public:
70 CPDF_PSProc(); 70 CPDF_PSProc();
71 ~CPDF_PSProc(); 71 ~CPDF_PSProc();
72 72
73 FX_BOOL Parse(CPDF_SimpleParser* parser, int depth); 73 bool Parse(CPDF_SimpleParser* parser, int depth);
74 FX_BOOL Execute(CPDF_PSEngine* pEngine); 74 bool Execute(CPDF_PSEngine* pEngine);
75 75
76 private: 76 private:
77 static const int kMaxDepth = 128; 77 static const int kMaxDepth = 128;
78 std::vector<std::unique_ptr<CPDF_PSOP>> m_Operators; 78 std::vector<std::unique_ptr<CPDF_PSOP>> m_Operators;
79 }; 79 };
80 80
81 class CPDF_PSEngine { 81 class CPDF_PSEngine {
82 public: 82 public:
83 CPDF_PSEngine(); 83 CPDF_PSEngine();
84 ~CPDF_PSEngine(); 84 ~CPDF_PSEngine();
85 85
86 FX_BOOL Parse(const FX_CHAR* str, int size); 86 bool Parse(const FX_CHAR* str, int size);
87 FX_BOOL Execute(); 87 bool Execute();
88 FX_BOOL DoOperator(PDF_PSOP op); 88 bool DoOperator(PDF_PSOP op);
89 void Reset() { m_StackCount = 0; } 89 void Reset() { m_StackCount = 0; }
90 void Push(FX_FLOAT value); 90 void Push(FX_FLOAT value);
91 void Push(int value) { Push((FX_FLOAT)value); } 91 void Push(int value) { Push((FX_FLOAT)value); }
92 FX_FLOAT Pop(); 92 FX_FLOAT Pop();
93 uint32_t GetStackSize() const { return m_StackCount; } 93 uint32_t GetStackSize() const { return m_StackCount; }
94 94
95 private: 95 private:
96 FX_FLOAT m_Stack[PSENGINE_STACKSIZE]; 96 FX_FLOAT m_Stack[PSENGINE_STACKSIZE];
97 uint32_t m_StackCount; 97 uint32_t m_StackCount;
98 CPDF_PSProc m_MainProc; 98 CPDF_PSProc m_MainProc;
99 }; 99 };
100 100
101 #endif // CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_ 101 #endif // CORE_FPDFAPI_PAGE_CPDF_PSENGINE_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/page/cpdf_pathobject.h ('k') | core/fpdfapi/page/cpdf_shadingpattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698