| 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
|
|
|