Native PDF parser implementation - don't try it on pdfs that are not generated by skia, Crome Print Preview or Chrome Save As Pdf - it will crash as mising xref, pdfs with updates, and other features are not supported yer.
Review URL: https://codereview.chromium.org/18323019
git-svn-id: http://skia.googlecode.com/svn/trunk@9962 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/PdfViewer/SkPdfUtils.cpp b/experimental/PdfViewer/SkPdfUtils.cpp
index 898f83d..869e633 100644
--- a/experimental/PdfViewer/SkPdfUtils.cpp
+++ b/experimental/PdfViewer/SkPdfUtils.cpp
@@ -1 +1,21 @@
#include "SkPdfUtils.h"
+#include "SkPdfConfig.h"
+
+#ifdef PDF_TRACE
+void SkTraceMatrix(const SkMatrix& matrix, const char* sz) {
+ printf("SkMatrix %s ", sz);
+ for (int i = 0 ; i < 9 ; i++) {
+ printf("%f ", SkScalarToDouble(matrix.get(i)));
+ }
+ printf("\n");
+}
+
+void SkTraceRect(const SkRect& rect, const char* sz) {
+ printf("SkRect %s ", sz);
+ printf("x = %f ", SkScalarToDouble(rect.x()));
+ printf("y = %f ", SkScalarToDouble(rect.y()));
+ printf("w = %f ", SkScalarToDouble(rect.width()));
+ printf("h = %f ", SkScalarToDouble(rect.height()));
+ printf("\n");
+}
+#endif