| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |