OLD | NEW |
1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ | 1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ |
2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ | 2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ |
3 | 3 |
4 #include "SkRect.h" | 4 #include "SkRect.h" |
5 #include "SkTDArray.h" | 5 #include "SkTDArray.h" |
6 | 6 |
7 class SkCanvas; | 7 class SkCanvas; |
8 | 8 |
9 class SkPdfAllocator; | 9 class SkPdfAllocator; |
10 class SkPdfMapper; | 10 class SkPdfMapper; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 SkPdfPageObjectDictionary* page(int page); | 57 SkPdfPageObjectDictionary* page(int page); |
58 | 58 |
59 const SkPdfMapper* mapper() const; | 59 const SkPdfMapper* mapper() const; |
60 SkPdfAllocator* allocator() const; | 60 SkPdfAllocator* allocator() const; |
61 | 61 |
62 SkPdfReal* createReal(double value) const; | 62 SkPdfReal* createReal(double value) const; |
63 SkPdfInteger* createInteger(int value) const; | 63 SkPdfInteger* createInteger(int value) const; |
64 // the string does not own the char* | 64 // the string does not own the char* |
65 SkPdfString* createString(const unsigned char* sz, size_t len) const; | 65 SkPdfString* createString(const unsigned char* sz, size_t len) const; |
66 | 66 |
67 SkPdfObject* resolveReference(const SkPdfObject* ref); | 67 SkPdfObject* resolveReference(SkPdfObject* ref); |
68 | 68 |
69 // Reports an approximation of all the memory usage. | 69 // Reports an approximation of all the memory usage. |
70 size_t bytesUsed() const; | 70 size_t bytesUsed() const; |
71 | 71 |
72 private: | 72 private: |
73 | 73 |
74 // Takes ownership of bytes. | 74 // Takes ownership of bytes. |
75 void init(const void* bytes, size_t length); | 75 void init(const void* bytes, size_t length); |
76 void loadWithoutXRef(); | 76 void loadWithoutXRef(); |
77 | 77 |
(...skipping 10 matching lines...) Expand all Loading... |
88 | 88 |
89 SkPdfObject* readObject(int id/*, int generation*/); | 89 SkPdfObject* readObject(int id/*, int generation*/); |
90 | 90 |
91 void fillPages(SkPdfPageTreeNodeDictionary* tree); | 91 void fillPages(SkPdfPageTreeNodeDictionary* tree); |
92 | 92 |
93 // private fields | 93 // private fields |
94 SkPdfAllocator* fAllocator; | 94 SkPdfAllocator* fAllocator; |
95 SkPdfMapper* fMapper; | 95 SkPdfMapper* fMapper; |
96 const unsigned char* fFileContent; | 96 const unsigned char* fFileContent; |
97 size_t fContentLength; | 97 size_t fContentLength; |
98 const SkPdfObject* fRootCatalogRef; | 98 SkPdfObject* fRootCatalogRef; |
99 SkPdfCatalogDictionary* fRootCatalog; | 99 SkPdfCatalogDictionary* fRootCatalog; |
100 | 100 |
101 mutable SkTDArray<PublicObjectEntry> fObjects; | 101 mutable SkTDArray<PublicObjectEntry> fObjects; |
102 SkTDArray<SkPdfPageObjectDictionary*> fPages; | 102 SkTDArray<SkPdfPageObjectDictionary*> fPages; |
103 }; | 103 }; |
104 | 104 |
105 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ | 105 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ |
OLD | NEW |