| 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; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 ((ch)==kOpenedSquareBracket_PdfDelimiter)||\ | 53 ((ch)==kOpenedSquareBracket_PdfDelimiter)||\ |
| 54 ((ch)==kClosedSquareBracket_PdfDelimiter)||\ | 54 ((ch)==kClosedSquareBracket_PdfDelimiter)||\ |
| 55 ((ch)==kOpenedCurlyBracket_PdfDelimiter)||\ | 55 ((ch)==kOpenedCurlyBracket_PdfDelimiter)||\ |
| 56 ((ch)==kClosedCurlyBracket_PdfDelimiter)||\ | 56 ((ch)==kClosedCurlyBracket_PdfDelimiter)||\ |
| 57 ((ch)==kNamed_PdfDelimiter)||\ | 57 ((ch)==kNamed_PdfDelimiter)||\ |
| 58 ((ch)==kComment_PdfDelimiter)) | 58 ((ch)==kComment_PdfDelimiter)) |
| 59 | 59 |
| 60 #define isPdfWhiteSpaceOrPdfDelimiter(ch) (isPdfWhiteSpace(ch)||isPdfDelimiter(c
h)) | 60 #define isPdfWhiteSpaceOrPdfDelimiter(ch) (isPdfWhiteSpace(ch)||isPdfDelimiter(c
h)) |
| 61 | 61 |
| 62 #define isPdfDigit(ch) ((ch)>='0'&&(ch)<='9') | 62 #define isPdfDigit(ch) ((ch)>='0'&&(ch)<='9') |
| 63 #define isPdfNumeric(ch) (isPdfDigit(ch)||(ch)=='+'||(ch)=='-') | 63 #define isPdfNumeric(ch) (isPdfDigit(ch)||(ch)=='+'||(ch)=='-'||(ch)=='.') |
| 64 | 64 |
| 65 const unsigned char* skipPdfWhiteSpaces(int level, const unsigned char* buffer,
size_t len); | 65 const unsigned char* skipPdfWhiteSpaces(int level, const unsigned char* buffer,
const unsigned char* end); |
| 66 const unsigned char* endOfPdfToken(int level, const unsigned char* start, size_t
len); | 66 const unsigned char* endOfPdfToken(int level, const unsigned char* start, const
unsigned char* end); |
| 67 const unsigned char* skipPdfComment(int level, const unsigned char* start, size_
t len); | |
| 68 | 67 |
| 69 // TODO(edisonn): typedef read and integer tyepes? make less readable... | 68 // TODO(edisonn): typedef read and integer tyepes? make less readable... |
| 70 //typedef double SkPdfReal; | 69 //typedef double SkPdfReal; |
| 71 //typedef int64_t SkPdfInteger; | 70 //typedef int64_t SkPdfInteger; |
| 72 | 71 |
| 73 // an allocator only allocates memory, and it deletes it all when the allocator
is destroyed | 72 // an allocator only allocates memory, and it deletes it all when the allocator
is destroyed |
| 74 // this would allow us not to do any garbage collection while we parse or draw a
pdf, and defere it | 73 // this would allow us not to do any garbage collection while we parse or draw a
pdf, and defere it |
| 75 // while the user is looking at the image | 74 // while the user is looking at the image |
| 76 | 75 |
| 77 class SkPdfObject; | 76 class SkPdfObject; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 const unsigned char* fUncompressedStreamStart; | 146 const unsigned char* fUncompressedStreamStart; |
| 148 const unsigned char* fUncompressedStream; | 147 const unsigned char* fUncompressedStream; |
| 149 const unsigned char* fUncompressedStreamEnd; | 148 const unsigned char* fUncompressedStreamEnd; |
| 150 | 149 |
| 151 bool fEmpty; | 150 bool fEmpty; |
| 152 bool fHasPutBack; | 151 bool fHasPutBack; |
| 153 PdfToken fPutBack; | 152 PdfToken fPutBack; |
| 154 }; | 153 }; |
| 155 | 154 |
| 156 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ | 155 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ |
| OLD | NEW |