OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2013 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 |
| 9 #ifndef SkPdfReporter_DEFINED |
| 10 #define SkPdfReporter_DEFINED |
| 11 |
| 12 #include "SkPdfConfig.h" |
| 13 |
| 14 class SkPdfNativeObject; |
| 15 class SkPdfContext; |
| 16 |
| 17 enum SkPdfIssueSeverity { |
| 18 kInfo_SkPdfIssueSeverity, |
| 19 kCodeWarning_SkPdfIssueSeverity, // e.g. like NYI, which has nothing to do w
ith an error in the file |
| 20 kWarning_SkPdfIssueSeverity, |
| 21 kIgnoreError_SkPdfIssueSeverity, |
| 22 kError_SkPdfIssueSeverity, |
| 23 kFatalError_SkPdfIssueSeverity, |
| 24 |
| 25 _kCount__SkPdfIssueSeverity |
| 26 }; |
| 27 |
| 28 enum SkPdfIssue { |
| 29 kNoIssue_SkPdfIssue, |
| 30 |
| 31 kNullObject_SkPdfIssue, |
| 32 kUnexpectedArraySize_SkPdfIssue, |
| 33 kMissingEncoding_SkPdfIssue, |
| 34 kNYI_SkPdfIssue, |
| 35 kIncostistentSizes_SkPdfIssue, |
| 36 kMissingRequiredKey_SkPdfIssue, |
| 37 kRecursiveReferencing_SkPdfIssue, |
| 38 kStackNestingOverflow_SkPdfIssue, |
| 39 kStackOverflow_SkPdfIssue, |
| 40 kIncositentSyntax_SkPdfIssue, |
| 41 kMissingFont_SkPdfIssue, |
| 42 kInvalidFont_SkPdfIssue, |
| 43 kMissingBT_SkPdfIssue, |
| 44 kOutOfRange_SkPdfIssue, |
| 45 kUnknownBlendMode_SkPdfIssue, |
| 46 kMissingExtGState_SkPdfIssue, |
| 47 kMissingXObject_SkPdfIssue, |
| 48 kReadStreamError_SkPdfIssue, |
| 49 kMissingToken_SkPdfIssue, |
| 50 kBadReference_SkPdfIssue, |
| 51 kNoFlateLibrary_SkPdfIssue, |
| 52 kBadStream_SkPdfIssue, |
| 53 |
| 54 |
| 55 _kCount__SkPdfIssue |
| 56 }; |
| 57 |
| 58 #ifdef PDF_REPORT |
| 59 |
| 60 void SkPdfReportIf(bool report, SkPdfIssueSeverity sev, SkPdfIssue issue, const
char* context, const SkPdfNativeObject* obj, SkPdfContext* pdfCo
ntext); |
| 61 void SkPdfReport( SkPdfIssueSeverity sev, SkPdfIssue issue, const
char* context, const SkPdfNativeObject* obj, SkPdfContext* pdfCo
ntext); |
| 62 void SkPdfReportUnexpectedType( SkPdfIssueSeverity sev, const
char* context, const SkPdfNativeObject* obj, int anyOfTypes, SkPdfContext* pdfCo
ntext); |
| 63 #define SkPdfREPORTCODE(code) code |
| 64 |
| 65 #else // !PDF_REPORT |
| 66 |
| 67 #define SkPdfReportIf(a,b,c,d,e,f) |
| 68 #define SkPdfReport(a,b,c,d,e) |
| 69 #define SkPdfReportUnexpectedType(a,b,c,d,e) |
| 70 #define SkPdfREPORTCODE(code) |
| 71 |
| 72 #endif // PDF_REPORT |
| 73 |
| 74 #endif // SkPdfReporter_DEFINED |
OLD | NEW |