OLD | NEW |
1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ | 1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ |
2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ | 2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ |
3 | 3 |
4 #include "SkTDArray.h" | 4 #include "SkTDArray.h" |
5 #include "SkTDict.h" | 5 #include "SkTDict.h" |
6 #include <math.h> | 6 #include <math.h> |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 class SkPdfMapper; | 9 class SkPdfMapper; |
10 class SkPdfDictionary; | 10 class SkPdfDictionary; |
| 11 class SkPdfImageDictionary; |
11 | 12 |
12 // White Spaces | 13 // White Spaces |
13 #define kNUL_PdfWhiteSpace '\x00' | 14 #define kNUL_PdfWhiteSpace '\x00' |
14 #define kHT_PdfWhiteSpace '\x09' | 15 #define kHT_PdfWhiteSpace '\x09' |
15 #define kLF_PdfWhiteSpace '\x0A' | 16 #define kLF_PdfWhiteSpace '\x0A' |
16 #define kFF_PdfWhiteSpace '\x0C' | 17 #define kFF_PdfWhiteSpace '\x0C' |
17 #define kCR_PdfWhiteSpace '\x0D' | 18 #define kCR_PdfWhiteSpace '\x0D' |
18 #define kSP_PdfWhiteSpace '\x20' | 19 #define kSP_PdfWhiteSpace '\x20' |
19 | 20 |
20 // PdfDelimiters | 21 // PdfDelimiters |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 class SkPdfNativeTokenizer { | 130 class SkPdfNativeTokenizer { |
130 public: | 131 public: |
131 SkPdfNativeTokenizer(SkPdfObject* objWithStream, const SkPdfMapper* mapper,
SkPdfAllocator* allocator, SkNativeParsedPDF* doc); | 132 SkPdfNativeTokenizer(SkPdfObject* objWithStream, const SkPdfMapper* mapper,
SkPdfAllocator* allocator, SkNativeParsedPDF* doc); |
132 SkPdfNativeTokenizer(unsigned char* buffer, int len, const SkPdfMapper* mapp
er, SkPdfAllocator* allocator, SkNativeParsedPDF* doc); | 133 SkPdfNativeTokenizer(unsigned char* buffer, int len, const SkPdfMapper* mapp
er, SkPdfAllocator* allocator, SkNativeParsedPDF* doc); |
133 | 134 |
134 virtual ~SkPdfNativeTokenizer(); | 135 virtual ~SkPdfNativeTokenizer(); |
135 | 136 |
136 bool readToken(PdfToken* token); | 137 bool readToken(PdfToken* token); |
137 bool readTokenCore(PdfToken* token); | 138 bool readTokenCore(PdfToken* token); |
138 void PutBack(PdfToken token); | 139 void PutBack(PdfToken token); |
| 140 SkPdfImageDictionary* readInlineImage(); |
139 | 141 |
140 private: | 142 private: |
141 SkNativeParsedPDF* fDoc; | 143 SkNativeParsedPDF* fDoc; |
142 const SkPdfMapper* fMapper; | 144 const SkPdfMapper* fMapper; |
143 SkPdfAllocator* fAllocator; | 145 SkPdfAllocator* fAllocator; |
144 | 146 |
145 unsigned char* fUncompressedStreamStart; | 147 unsigned char* fUncompressedStreamStart; |
146 unsigned char* fUncompressedStream; | 148 unsigned char* fUncompressedStream; |
147 unsigned char* fUncompressedStreamEnd; | 149 unsigned char* fUncompressedStreamEnd; |
148 | 150 |
149 bool fEmpty; | 151 bool fEmpty; |
150 bool fHasPutBack; | 152 bool fHasPutBack; |
151 PdfToken fPutBack; | 153 PdfToken fPutBack; |
152 }; | 154 }; |
153 | 155 |
154 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ | 156 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ |
OLD | NEW |