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

Unified Diff: experimental/PdfViewer/SkPdfConfig.h

Issue 23601017: pdfviewer: track what objects have been used during rendering. It will be the base of reporting unu… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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 | « no previous file | experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfConfig.h
===================================================================
--- experimental/PdfViewer/SkPdfConfig.h (revision 11092)
+++ experimental/PdfViewer/SkPdfConfig.h (working copy)
@@ -8,6 +8,8 @@
#ifndef SkPdfConfig_DEFINED
#define SkPdfConfig_DEFINED
+#define PDF_TRACK_OBJECT_USAGE
+//#define PDF_TRACK_STREAM_OFFSETS
//#define PDF_TRACE
//#define PDF_TRACE_READ_TOKEN
//#define PDF_TRACE_DRAWTEXT
@@ -16,4 +18,19 @@
//#define PDF_DEBUG_NO_PAGE_CLIPING
//#define PDF_DEBUG_3X
+
+// TODO(edisonn): pass a flag to say how it was used? e.g. asked the type? Obtained value?
+// Implement it when it will be needed the first time to fix some bug.
+#ifdef PDF_TRACK_OBJECT_USAGE
+#define SkPdfMarkObjectUsed() fUsed = true
+#else
+#define SkPdfMarkObjectUsed()
+#endif // PDF_TRACK_OBJECT_USAGE
+
+#ifdef PDF_TRACK_OBJECT_USAGE
+#define SkPdfMarkObjectUnused() fUsed = false
+#else
+#define SkPdfMarkObjectUnused()
+#endif // PDF_TRACK_OBJECT_USAGE
+
#endif // SkPdfConfig_DEFINED
« no previous file with comments | « no previous file | experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698