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

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

Issue 80463005: Separate and update PDF_DIFF_TRACE_IN_PNG (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPdfNativeTokenizer_DEFINED 8 #ifndef SkPdfNativeTokenizer_DEFINED
9 #define SkPdfNativeTokenizer_DEFINED 9 #define SkPdfNativeTokenizer_DEFINED
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 class SkPdfNativeTokenizer { 158 class SkPdfNativeTokenizer {
159 public: 159 public:
160 SkPdfNativeTokenizer(SkPdfNativeObject* objWithStream, 160 SkPdfNativeTokenizer(SkPdfNativeObject* objWithStream,
161 SkPdfAllocator* allocator, SkPdfNativeDoc* doc); 161 SkPdfAllocator* allocator, SkPdfNativeDoc* doc);
162 SkPdfNativeTokenizer(const unsigned char* buffer, int len, 162 SkPdfNativeTokenizer(const unsigned char* buffer, int len,
163 SkPdfAllocator* allocator, SkPdfNativeDoc* doc); 163 SkPdfAllocator* allocator, SkPdfNativeDoc* doc);
164 164
165 virtual ~SkPdfNativeTokenizer(); 165 virtual ~SkPdfNativeTokenizer();
166 166
167 // Reads one token. Returns false if there are no more tokens. 167 // Reads one token. Returns false if there are no more tokens.
168 bool readToken(PdfToken* token); 168 // If write is true, and a token was read, write the difference caused by
169 // token to a file.
170 bool readToken(PdfToken* token, bool write = false);
mtklein 2013/11/22 14:46:12 maybe writeDiff?
scroggo 2013/11/22 15:47:16 Done.
169 171
170 // Put back a token to be read in the nextToken read. Only one token is allo wed to be put 172 // Put back a token to be read in the nextToken read. Only one token is allo wed to be put
171 // back. Must not necesaarely be the last token read. 173 // back. Must not necesaarely be the last token read.
172 void PutBack(PdfToken token); 174 void PutBack(PdfToken token);
173 175
174 // Reads the inline image that is present in the stream. At this point we ju st consumed the ID 176 // Reads the inline image that is present in the stream. At this point we ju st consumed the ID
175 // token already. 177 // token already.
176 SkPdfImageDictionary* readInlineImage(); 178 SkPdfImageDictionary* readInlineImage();
177 179
178 private: 180 private:
(...skipping 10 matching lines...) Expand all
189 bool fHasPutBack; 191 bool fHasPutBack;
190 PdfToken fPutBack; 192 PdfToken fPutBack;
191 }; 193 };
192 194
193 const unsigned char* nextObject(const unsigned char* start, const unsigned char* end, 195 const unsigned char* nextObject(const unsigned char* start, const unsigned char* end,
194 SkPdfNativeObject* token, 196 SkPdfNativeObject* token,
195 SkPdfAllocator* allocator, 197 SkPdfAllocator* allocator,
196 SkPdfNativeDoc* doc); 198 SkPdfNativeDoc* doc);
197 199
198 #endif // SkPdfNativeTokenizer_DEFINED 200 #endif // SkPdfNativeTokenizer_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698