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

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: rebase Created 7 years 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 writeDiff is true, and a token was read, create a PNG highlighting
169 // the difference caused by this command in /tmp/log_step_by_step.
170 // If PDF_TRACE_DIFF_IN_PNG is not defined, writeDiff does nothing.
171 bool readToken(PdfToken* token, bool writeDiff = false);
169 172
170 // Put back a token to be read in the nextToken read. Only one token is allo wed to be put 173 // 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. 174 // back. Must not necesaarely be the last token read.
172 void PutBack(PdfToken token); 175 void PutBack(PdfToken token);
173 176
174 // Reads the inline image that is present in the stream. At this point we ju st consumed the ID 177 // Reads the inline image that is present in the stream. At this point we ju st consumed the ID
175 // token already. 178 // token already.
176 SkPdfImageDictionary* readInlineImage(); 179 SkPdfImageDictionary* readInlineImage();
177 180
178 private: 181 private:
(...skipping 10 matching lines...) Expand all
189 bool fHasPutBack; 192 bool fHasPutBack;
190 PdfToken fPutBack; 193 PdfToken fPutBack;
191 }; 194 };
192 195
193 const unsigned char* nextObject(const unsigned char* start, const unsigned char* end, 196 const unsigned char* nextObject(const unsigned char* start, const unsigned char* end,
194 SkPdfNativeObject* token, 197 SkPdfNativeObject* token,
195 SkPdfAllocator* allocator, 198 SkPdfAllocator* allocator,
196 SkPdfNativeDoc* doc); 199 SkPdfNativeDoc* doc);
197 200
198 #endif // SkPdfNativeTokenizer_DEFINED 201 #endif // SkPdfNativeTokenizer_DEFINED
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698