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

Side by Side Diff: core/fpdfapi/fpdf_page/pageint.h

Issue 2366673003: Rename CPDF_CountedObject to CFX_WeakPtr::Handle (Closed)
Patch Set: comment Created 4 years, 3 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
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_PAGE_PAGEINT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set> 12 #include <set>
13 #include <unordered_map> 13 #include <unordered_map>
14 #include <vector> 14 #include <vector>
15 15
16 #include "core/fpdfapi/fpdf_page/cpdf_contentmark.h" 16 #include "core/fpdfapi/fpdf_page/cpdf_contentmark.h"
17 #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h" 17 #include "core/fpdfapi/fpdf_page/cpdf_pattern.h"
18 #include "core/fpdfapi/fpdf_page/include/cpdf_colorspace.h"
18 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" 19 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h"
20 #include "core/fxcrt/include/cfx_weak_ptr.h"
19 #include "core/fxge/include/cfx_pathdata.h" 21 #include "core/fxge/include/cfx_pathdata.h"
20 #include "core/fxge/include/cfx_renderdevice.h" 22 #include "core/fxge/include/cfx_renderdevice.h"
21 23
22 class CPDF_AllStates; 24 class CPDF_AllStates;
23 class CPDF_ColorSpace;
24 class CPDF_ExpIntFunc; 25 class CPDF_ExpIntFunc;
25 class CPDF_Font; 26 class CPDF_Font;
26 class CPDF_FontEncoding; 27 class CPDF_FontEncoding;
27 class CPDF_Form; 28 class CPDF_Form;
28 class CPDF_IccProfile; 29 class CPDF_IccProfile;
29 class CPDF_Image; 30 class CPDF_Image;
30 class CPDF_ImageObject; 31 class CPDF_ImageObject;
31 class CPDF_Page; 32 class CPDF_Page;
32 class CPDF_Pattern;
33 class CPDF_SampledFunc; 33 class CPDF_SampledFunc;
34 class CPDF_StitchFunc; 34 class CPDF_StitchFunc;
35 class CPDF_StreamAcc; 35 class CPDF_StreamAcc;
36 class CPDF_TextObject; 36 class CPDF_TextObject;
37 class CPDF_Type3Char; 37 class CPDF_Type3Char;
38 38
39 #define PARSE_STEP_LIMIT 100 39 #define PARSE_STEP_LIMIT 100
40 40
41 class CPDF_StreamParser { 41 class CPDF_StreamParser {
42 public: 42 public:
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 void ReleaseImage(const CPDF_Object* pImageStream); 338 void ReleaseImage(const CPDF_Object* pImageStream);
339 CPDF_IccProfile* GetIccProfile(CPDF_Stream* pIccProfileStream); 339 CPDF_IccProfile* GetIccProfile(CPDF_Stream* pIccProfileStream);
340 void ReleaseIccProfile(const CPDF_IccProfile* pIccProfile); 340 void ReleaseIccProfile(const CPDF_IccProfile* pIccProfile);
341 CPDF_StreamAcc* GetFontFileStreamAcc(CPDF_Stream* pFontStream); 341 CPDF_StreamAcc* GetFontFileStreamAcc(CPDF_Stream* pFontStream);
342 void ReleaseFontFileStreamAcc(const CPDF_Stream* pFontStream); 342 void ReleaseFontFileStreamAcc(const CPDF_Stream* pFontStream);
343 FX_BOOL IsForceClear() const { return m_bForceClear; } 343 FX_BOOL IsForceClear() const { return m_bForceClear; }
344 CPDF_CountedColorSpace* FindColorSpacePtr(CPDF_Object* pCSObj) const; 344 CPDF_CountedColorSpace* FindColorSpacePtr(CPDF_Object* pCSObj) const;
345 CPDF_CountedPattern* FindPatternPtr(CPDF_Object* pPatternObj) const; 345 CPDF_CountedPattern* FindPatternPtr(CPDF_Object* pPatternObj) const;
346 346
347 private: 347 private:
348 using CPDF_CountedFont = CPDF_CountedObject<CPDF_Font>; 348 using CPDF_CountedFont = CFX_WeakPtr<CPDF_Font>::Handle;
349 using CPDF_CountedIccProfile = CPDF_CountedObject<CPDF_IccProfile>; 349 using CPDF_CountedIccProfile = CFX_WeakPtr<CPDF_IccProfile>::Handle;
350 using CPDF_CountedImage = CPDF_CountedObject<CPDF_Image>; 350 using CPDF_CountedImage = CFX_WeakPtr<CPDF_Image>::Handle;
351 using CPDF_CountedStreamAcc = CPDF_CountedObject<CPDF_StreamAcc>; 351 using CPDF_CountedStreamAcc = CFX_WeakPtr<CPDF_StreamAcc>::Handle;
352 352
353 using CPDF_ColorSpaceMap = 353 using CPDF_ColorSpaceMap =
354 std::map<const CPDF_Object*, CPDF_CountedColorSpace*>; 354 std::map<const CPDF_Object*, CPDF_CountedColorSpace*>;
355 using CPDF_FontFileMap = std::map<const CPDF_Stream*, CPDF_CountedStreamAcc*>; 355 using CPDF_FontFileMap = std::map<const CPDF_Stream*, CPDF_CountedStreamAcc*>;
356 using CPDF_FontMap = std::map<const CPDF_Dictionary*, CPDF_CountedFont*>; 356 using CPDF_FontMap = std::map<const CPDF_Dictionary*, CPDF_CountedFont*>;
357 using CPDF_IccProfileMap = 357 using CPDF_IccProfileMap =
358 std::map<const CPDF_Stream*, CPDF_CountedIccProfile*>; 358 std::map<const CPDF_Stream*, CPDF_CountedIccProfile*>;
359 using CPDF_ImageMap = std::map<uint32_t, CPDF_CountedImage*>; 359 using CPDF_ImageMap = std::map<uint32_t, CPDF_CountedImage*>;
360 using CPDF_PatternMap = std::map<const CPDF_Object*, CPDF_CountedPattern*>; 360 using CPDF_PatternMap = std::map<const CPDF_Object*, CPDF_CountedPattern*>;
361 361
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 }; 555 };
556 556
557 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr); 557 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr);
558 CFX_ByteStringC PDF_FindValueAbbreviationForTesting( 558 CFX_ByteStringC PDF_FindValueAbbreviationForTesting(
559 const CFX_ByteStringC& abbr); 559 const CFX_ByteStringC& abbr);
560 560
561 void PDF_ReplaceAbbr(CPDF_Object* pObj); 561 void PDF_ReplaceAbbr(CPDF_Object* pObj);
562 bool IsPathOperator(const uint8_t* buf, size_t len); 562 bool IsPathOperator(const uint8_t* buf, size_t len);
563 563
564 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_ 564 #endif // CORE_FPDFAPI_FPDF_PAGE_PAGEINT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_colorspace.h ('k') | core/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698