Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h

Issue 18584010: pdfviewer: add --pages arg: render a certain page (all, all in desceding order, firsl, last and by … (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 SkPdfObject* allocObject(); 97 SkPdfObject* allocObject();
98 98
99 // TODO(edisonn): free this memory in destructor, track the usage? 99 // TODO(edisonn): free this memory in destructor, track the usage?
100 void* alloc(size_t bytes) { 100 void* alloc(size_t bytes) {
101 void* data = malloc(bytes); 101 void* data = malloc(bytes);
102 fHandles.push(data); 102 fHandles.push(data);
103 fSizeInBytes += bytes; 103 fSizeInBytes += bytes;
104 return data; 104 return data;
105 } 105 }
106 106
107 size_t bytesUsed() { 107 size_t bytesUsed() const {
108 return fSizeInBytes; 108 return fSizeInBytes;
109 } 109 }
110 }; 110 };
111 111
112 class SkNativeParsedPDF; 112 class SkNativeParsedPDF;
113 unsigned char* nextObject(unsigned char* start, unsigned char* end, SkPdfObject* token, SkPdfAllocator* allocator, SkNativeParsedPDF* doc); 113 unsigned char* nextObject(unsigned char* start, unsigned char* end, SkPdfObject* token, SkPdfAllocator* allocator, SkNativeParsedPDF* doc);
114 114
115 enum SkPdfTokenType { 115 enum SkPdfTokenType {
116 kKeyword_TokenType, 116 kKeyword_TokenType,
117 kObject_TokenType, 117 kObject_TokenType,
(...skipping 27 matching lines...) Expand all
145 unsigned char* fUncompressedStreamStart; 145 unsigned char* fUncompressedStreamStart;
146 unsigned char* fUncompressedStream; 146 unsigned char* fUncompressedStream;
147 unsigned char* fUncompressedStreamEnd; 147 unsigned char* fUncompressedStreamEnd;
148 148
149 bool fEmpty; 149 bool fEmpty;
150 bool fHasPutBack; 150 bool fHasPutBack;
151 PdfToken fPutBack; 151 PdfToken fPutBack;
152 }; 152 };
153 153
154 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_ 154 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFNATIVETOKENIZER_H_
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698