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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 SkPdfReal* createReal(double value) const; | 55 SkPdfReal* createReal(double value) const; |
56 SkPdfInteger* createInteger(int value) const; | 56 SkPdfInteger* createInteger(int value) const; |
57 // the string does not own the char* | 57 // the string does not own the char* |
58 SkPdfString* createString(unsigned char* sz, size_t len) const; | 58 SkPdfString* createString(unsigned char* sz, size_t len) const; |
59 | 59 |
60 void drawPage(int page, SkCanvas* canvas); | 60 void drawPage(int page, SkCanvas* canvas); |
61 | 61 |
62 SkPdfObject* resolveReference(const SkPdfObject* ref); | 62 SkPdfObject* resolveReference(const SkPdfObject* ref); |
63 | 63 |
64 // Reports an approximation of all the memory usage. | 64 // Reports an approximation of all the memory usage. |
65 size_t bytesUsed(); | 65 size_t bytesUsed() const; |
66 | 66 |
67 private: | 67 private: |
68 | 68 |
69 unsigned char* readCrossReferenceSection(unsigned char* xrefStart, unsigned
char* trailerEnd); | 69 unsigned char* readCrossReferenceSection(unsigned char* xrefStart, unsigned
char* trailerEnd); |
70 long readTrailer(unsigned char* trailerStart, unsigned char* trailerEnd, boo
l storeCatalog); | 70 long readTrailer(unsigned char* trailerStart, unsigned char* trailerEnd, boo
l storeCatalog); |
71 | 71 |
72 // TODO(edisonn): updates not supported right now, generation ignored | 72 // TODO(edisonn): updates not supported right now, generation ignored |
73 void addCrossSectionInfo(int id, int generation, int offset, bool isFreed); | 73 void addCrossSectionInfo(int id, int generation, int offset, bool isFreed); |
74 static void reset(PublicObjectEntry* obj) { | 74 static void reset(PublicObjectEntry* obj) { |
75 obj->fObj = NULL; | 75 obj->fObj = NULL; |
(...skipping 11 matching lines...) Expand all Loading... |
87 unsigned char* fFileContent; | 87 unsigned char* fFileContent; |
88 size_t fContentLength; | 88 size_t fContentLength; |
89 const SkPdfObject* fRootCatalogRef; | 89 const SkPdfObject* fRootCatalogRef; |
90 SkPdfCatalogDictionary* fRootCatalog; | 90 SkPdfCatalogDictionary* fRootCatalog; |
91 | 91 |
92 mutable SkTDArray<PublicObjectEntry> fObjects; | 92 mutable SkTDArray<PublicObjectEntry> fObjects; |
93 SkTDArray<SkPdfPageObjectDictionary*> fPages; | 93 SkTDArray<SkPdfPageObjectDictionary*> fPages; |
94 }; | 94 }; |
95 | 95 |
96 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ | 96 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKNATIVEPARSEDPDF_H_ |
OLD | NEW |