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

Unified Diff: experimental/PdfViewer/SkPdfConfig.h

Issue 26700002: remove tracking code, as it polutes the code readability. Should be added back, in a less eficient … (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 | « no previous file | experimental/PdfViewer/pdf_viewer_main.cpp » ('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 11625)
+++ experimental/PdfViewer/SkPdfConfig.h (working copy)
@@ -11,15 +11,38 @@
#include "stddef.h"
class SkPdfNativeObject;
+// shows what objects have not been used in rendering. can be used to track what features we might
+// have not implemented, or where we implemented only the default behaivour
//#define PDF_TRACK_OBJECT_USAGE
+
+// tracks the position in the stream, it can be used to show where exactly the errors happened
//#define PDF_TRACK_STREAM_OFFSETS
+
+// reports issues, warning, NYI, errors, ...
+// enable PDF_TRACK_STREAM_OFFSETS to also have the offset in the stream where the error happened
//#define PDF_REPORT
+
+// At various points in code we show the value of important variables with this flag
//#define PDF_TRACE
+
+// displays the result of each read token, individual result
//#define PDF_TRACE_READ_TOKEN
+
+// Every drawtext draws before a rectangle, in this way we see the one that might have failed
//#define PDF_TRACE_DRAWTEXT
+
+// For each render operations, it will dump the canvas in a png
//#define PDF_TRACE_DIFF_IN_PNG
+
+// Does not clip at all, can be used in debugging issues
//#define PDF_DEBUG_NO_CLIPING
+
+// Does not click the page, use is with 3x
//#define PDF_DEBUG_NO_PAGE_CLIPING
+
+// render the page 3X bigger (with content in center) - used to make sure we don't mess up
+// positioning
+// like a tick tac toe board, only the center one has content, all the rest of them have to be clean
//#define PDF_DEBUG_3X
@@ -38,41 +61,9 @@
#endif // PDF_TRACK_OBJECT_USAGE
#ifdef PDF_TRACK_STREAM_OFFSETS
-
-// TODO(edisonn): track source files
-#define SkPdfTrackSrourceFile(foo) -2
-
-#define GET_TRACK_STREAM , int streamId, const unsigned char* streamStart
-#define PUT_TRACK_STREAM_ARGS , streamId, streamStart
-#define PUT_TRACK_STREAM(start,end) , streamId, start-streamStart, end-streamStart
-#define PUT_TRACK_STREAM_ARGS_EXPL(a,b,c) , a, b, c
-#define PUT_TRACK_STREAM_ARGS_EXPL2(a,b) , a, b
-
-
-#define PUT_TRACK_PARAMETERS , streamId, offsetStart, offsetEnd
-#define PUT_TRACK_PARAMETERS_OBJ(obj) , (obj)->streamId(), (obj)->offsetStart(), (obj)->offsetEnd()
-#define PUT_TRACK_PARAMETERS_OBJ2(obj,objEnd) , (obj)->streamId(), (obj)->offsetStart(), (objEnd)->offsetEnd()
-#define PUT_TRACK_PARAMETERS_SRC , SkPdfTrackSrourceFile(__FILE__), __LINE__, __LINE__
-#define PUT_TRACK_PARAMETERS_SRC0 SkPdfTrackSrourceFile(__FILE__), __LINE__, __LINE__
-#define GET_TRACK_PARAMETERS , int streamId, int offsetStart, int offsetEnd
-#define GET_TRACK_PARAMETERS0 int streamId, int offsetStart, int offsetEnd
#define STORE_TRACK_PARAMETERS(obj) (obj)->fStreamId = streamId; (obj)->fOffsetStart = offsetStart; (obj)->fOffsetEnd = offsetEnd;
#define STORE_TRACK_PARAMETER_OFFSET_END(obj,offsetEnd) (obj)->fOffsetEnd = (offsetEnd)-streamStart;
#else
-#define GET_TRACK_STREAM
-#define PUT_TRACK_STREAM_ARGS
-#define PUT_TRACK_STREAM(start,end)
-#define PUT_TRACK_STREAM_ARGS_EXPL(a,b,c)
-#define PUT_TRACK_STREAM_ARGS_EXPL2(a,b)
-
-
-#define PUT_TRACK_PARAMETERS
-#define PUT_TRACK_PARAMETERS_OBJ(obj)
-#define PUT_TRACK_PARAMETERS_OBJ2(obj,objEnd)
-#define PUT_TRACK_PARAMETERS_SRC
-#define PUT_TRACK_PARAMETERS_SRC0
-#define GET_TRACK_PARAMETERS
-#define GET_TRACK_PARAMETERS0
#define STORE_TRACK_PARAMETERS(obj)
#define STORE_TRACK_PARAMETER_OFFSET_END(obj,offsetEnd)
#endif //PDF_TRACK_STREAM_OFFSETS
« no previous file with comments | « no previous file | experimental/PdfViewer/pdf_viewer_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698