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

Side by Side Diff: experimental/PdfViewer/SkPdfUtils.h

Issue 27057003: pdfviewer: more code comments + concat the pdf matrix with the existing matrix in canvas, instead o… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 2 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/SkPdfReporter.cpp ('k') | experimental/PdfViewer/SkTrackDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SkPdfUtils_DEFINED 8 #ifndef SkPdfUtils_DEFINED
9 #define SkPdfUtils_DEFINED 9 #define SkPdfUtils_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 kOK_SkPdfResult, 23 kOK_SkPdfResult,
24 kPartial_SkPdfResult, 24 kPartial_SkPdfResult,
25 kNYI_SkPdfResult, 25 kNYI_SkPdfResult,
26 kIgnoreError_SkPdfResult, 26 kIgnoreError_SkPdfResult,
27 kError_SkPdfResult, 27 kError_SkPdfResult,
28 kUnsupported_SkPdfResult, 28 kUnsupported_SkPdfResult,
29 29
30 kCount_SkPdfResult 30 kCount_SkPdfResult
31 }; 31 };
32 32
33 // In order to operate fast, when we parse the pdf, we try not to allocate many new strings,
34 // and if possible we refer the string in the pdf stream.
33 struct NotOwnedString { 35 struct NotOwnedString {
34 const unsigned char* fBuffer; 36 const unsigned char* fBuffer;
35 // TODO(edisonn): clean up, the last two bytes are used to signal if compres sion is used 37 // TODO(edisonn): clean up, the last two bytes are used to signal if compres sion is used
36 size_t fBytes; 38 size_t fBytes;
37 39
38 static void init(NotOwnedString* str) { 40 static void init(NotOwnedString* str) {
39 str->fBuffer = NULL; 41 str->fBuffer = NULL;
40 str->fBytes = 0; 42 str->fBytes = 0;
41 } 43 }
42 44
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 112
111 #else 113 #else
112 #define TRACE_COMMENT(ch) 114 #define TRACE_COMMENT(ch)
113 #define TRACE_TK(ch) 115 #define TRACE_TK(ch)
114 #define TRACE_NAME(start,end) 116 #define TRACE_NAME(start,end)
115 #define TRACE_STRING(start,end) 117 #define TRACE_STRING(start,end)
116 #define TRACE_HEXSTRING(start,end) 118 #define TRACE_HEXSTRING(start,end)
117 #endif 119 #endif
118 120
119 #endif // SkPdfUtils_DEFINED 121 #endif // SkPdfUtils_DEFINED
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfReporter.cpp ('k') | experimental/PdfViewer/SkTrackDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698