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

Side by Side Diff: src/pdf/SkPDFCatalog.h

Issue 870333002: Simplify reference management in SkPDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tests Created 5 years, 10 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 | « no previous file | src/pdf/SkPDFCatalog.cpp » ('j') | src/pdf/SkPDFCatalog.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPDFCatalog_DEFINED 10 #ifndef SkPDFCatalog_DEFINED
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 /** Set substitute object for the passed object. 70 /** Set substitute object for the passed object.
71 */ 71 */
72 void setSubstitute(SkPDFObject* original, SkPDFObject* substitute); 72 void setSubstitute(SkPDFObject* original, SkPDFObject* substitute);
73 73
74 /** Find and return any substitute object set for the passed object. If 74 /** Find and return any substitute object set for the passed object. If
75 * there is none, return the passed object. 75 * there is none, return the passed object.
76 */ 76 */
77 SkPDFObject* getSubstituteObject(SkPDFObject* object); 77 SkPDFObject* getSubstituteObject(SkPDFObject* object);
78 78
79 /** get the resources of substitute objects.
80 */
81 SkTSet<SkPDFObject*>* getSubstituteList(bool firstPage);
82
83 private: 79 private:
84 struct Rec { 80 struct Rec {
85 Rec(SkPDFObject* object, bool onFirstPage) 81 Rec(SkPDFObject* object, bool onFirstPage)
86 : fObject(object), 82 : fObject(object),
87 fFileOffset(0), 83 fFileOffset(0),
88 fObjNumAssigned(false), 84 fObjNumAssigned(false),
89 fOnFirstPage(onFirstPage) { 85 fOnFirstPage(onFirstPage) {
90 } 86 }
91 SkPDFObject* fObject; 87 SkPDFObject* fObject;
92 off_t fFileOffset; 88 off_t fFileOffset;
(...skipping 19 matching lines...) Expand all
112 108
113 // Number of objects on the first page. 109 // Number of objects on the first page.
114 uint32_t fFirstPageCount; 110 uint32_t fFirstPageCount;
115 // Next object number to assign (on page > 1). 111 // Next object number to assign (on page > 1).
116 uint32_t fNextObjNum; 112 uint32_t fNextObjNum;
117 // Next object number to assign on the first page. 113 // Next object number to assign on the first page.
118 uint32_t fNextFirstPageObjNum; 114 uint32_t fNextFirstPageObjNum;
119 115
120 SkPDFDocument::Flags fDocumentFlags; 116 SkPDFDocument::Flags fDocumentFlags;
121 117
122 int findObjectIndex(SkPDFObject* obj) const; 118 int findObjectIndex(SkPDFObject* obj);
123 119
124 int assignObjNum(SkPDFObject* obj); 120 int assignObjNum(SkPDFObject* obj);
125 }; 121 };
126 122
127 #endif 123 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFCatalog.cpp » ('j') | src/pdf/SkPDFCatalog.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698