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

Unified Diff: experimental/PdfViewer/SkPdfUtils.h

Issue 26613006: code cleanup (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/SkPdfConfig.h ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfUtils.h
===================================================================
--- experimental/PdfViewer/SkPdfUtils.h (revision 11625)
+++ experimental/PdfViewer/SkPdfUtils.h (working copy)
@@ -32,6 +32,7 @@
struct NotOwnedString {
const unsigned char* fBuffer;
+ // TODO(edisonn): clean up, the last two bytes are used to signal if compression is used
size_t fBytes;
static void init(NotOwnedString* str) {
@@ -50,6 +51,8 @@
}
};
+SkMatrix SkMatrixFromPdfMatrix(double array[6]);
+
// TODO(edisonn): hack to make code generation simpler. Alternatively we can update the
// generate_code.py not to rely on != operator
bool operator !=(const SkString& first, const char* second);
@@ -70,4 +73,46 @@
#define SkTraceRect(a,b)
#endif
+#ifdef PDF_TRACE_TOKENIZER
+
+static void TRACE_COMMENT(char ch) {
+ printf("%c", ch);
+}
+
+static void TRACE_TK(char ch) {
+ printf("%c", ch);
+}
+
+static void TRACE_NAME(const unsigned char* start, const unsigned char* end) {
+ while (start < end) {
+ printf("%c", *start);
+ start++;
+ }
+ printf("\n");
+}
+
+static void TRACE_STRING(const unsigned char* start, const unsigned char* end) {
+ while (start < end) {
+ printf("%c", *start);
+ start++;
+ }
+ printf("\n");
+}
+
+static void TRACE_HEXSTRING(const unsigned char* start, const unsigned char* end) {
+ while (start < end) {
+ printf("%c", *start);
+ start++;
+ }
+ printf("\n");
+}
+
+#else
+#define TRACE_COMMENT(ch)
+#define TRACE_TK(ch)
+#define TRACE_NAME(start,end)
+#define TRACE_STRING(start,end)
+#define TRACE_HEXSTRING(start,end)
+#endif
+
#endif // SkPdfUtils_DEFINED
« no previous file with comments | « experimental/PdfViewer/SkPdfConfig.h ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698