OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPdfConfig_DEFINED | 8 #ifndef SkPdfConfig_DEFINED |
9 #define SkPdfConfig_DEFINED | 9 #define SkPdfConfig_DEFINED |
10 | 10 |
| 11 #include "stddef.h" |
| 12 class SkPdfNativeObject; |
| 13 |
11 //#define PDF_TRACK_OBJECT_USAGE | 14 //#define PDF_TRACK_OBJECT_USAGE |
12 //#define PDF_TRACK_STREAM_OFFSETS | 15 //#define PDF_TRACK_STREAM_OFFSETS |
| 16 #define PDF_REPORT |
13 //#define PDF_TRACE | 17 //#define PDF_TRACE |
14 //#define PDF_TRACE_READ_TOKEN | 18 //#define PDF_TRACE_READ_TOKEN |
15 //#define PDF_TRACE_DRAWTEXT | 19 //#define PDF_TRACE_DRAWTEXT |
16 //#define PDF_TRACE_DIFF_IN_PNG | 20 //#define PDF_TRACE_DIFF_IN_PNG |
17 //#define PDF_DEBUG_NO_CLIPING | 21 //#define PDF_DEBUG_NO_CLIPING |
18 //#define PDF_DEBUG_NO_PAGE_CLIPING | 22 //#define PDF_DEBUG_NO_PAGE_CLIPING |
19 //#define PDF_DEBUG_3X | 23 //#define PDF_DEBUG_3X |
20 | 24 |
21 | 25 |
22 // TODO(edisonn): pass a flag to say how it was used? e.g. asked the type? Obtai
ned value? | 26 // TODO(edisonn): pass a flag to say how it was used? e.g. asked the type? Obtai
ned value? |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #define PUT_TRACK_PARAMETERS_OBJ(obj) | 70 #define PUT_TRACK_PARAMETERS_OBJ(obj) |
67 #define PUT_TRACK_PARAMETERS_OBJ2(obj,objEnd) | 71 #define PUT_TRACK_PARAMETERS_OBJ2(obj,objEnd) |
68 #define PUT_TRACK_PARAMETERS_SRC | 72 #define PUT_TRACK_PARAMETERS_SRC |
69 #define PUT_TRACK_PARAMETERS_SRC0 | 73 #define PUT_TRACK_PARAMETERS_SRC0 |
70 #define GET_TRACK_PARAMETERS | 74 #define GET_TRACK_PARAMETERS |
71 #define GET_TRACK_PARAMETERS0 | 75 #define GET_TRACK_PARAMETERS0 |
72 #define STORE_TRACK_PARAMETERS(obj) | 76 #define STORE_TRACK_PARAMETERS(obj) |
73 #define STORE_TRACK_PARAMETER_OFFSET_END(obj,offsetEnd) | 77 #define STORE_TRACK_PARAMETER_OFFSET_END(obj,offsetEnd) |
74 #endif //PDF_TRACK_STREAM_OFFSETS | 78 #endif //PDF_TRACK_STREAM_OFFSETS |
75 | 79 |
| 80 // TODO(edisonn): move it somewhere else? |
| 81 struct SkPdfInputStream { |
| 82 #ifdef PDF_TRACK_STREAM_OFFSETS |
| 83 // no parent object -> original file to be rendered |
| 84 // no parent file -> stream object |
| 85 // both -> external stream object |
| 86 int fParentFileID; |
| 87 const SkPdfNativeObject* fParentObject; |
| 88 |
| 89 size_t fDelta; // delta in parent stream |
| 90 const unsigned char* fStart; |
| 91 #endif // PDF_TRACK_STREAM_OFFSETS |
| 92 |
| 93 const unsigned char* fEnd; |
| 94 }; |
| 95 |
| 96 struct SkPdfInputStreamLocation { |
| 97 SkPdfInputStream fInputStream; |
| 98 const unsigned char* fNow; |
| 99 }; |
| 100 |
| 101 #ifdef PDF_TRACK_STREAM_OFFSETS |
| 102 struct SkPdfInputStreamRange { |
| 103 SkPdfInputStream fInputStream; |
| 104 const unsigned char* fRangeStart; |
| 105 const unsigned char* fRangeEnd; |
| 106 }; |
| 107 #endif // PDF_TRACK_STREAM_OFFSETS |
| 108 |
76 | 109 |
77 #endif // SkPdfConfig_DEFINED | 110 #endif // SkPdfConfig_DEFINED |
OLD | NEW |