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

Side by Side Diff: experimental/PdfViewer/SkPdfReporter.cpp

Issue 27057003: pdfviewer: more code comments + concat the pdf matrix with the existing matrix in canvas, instead o… (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « experimental/PdfViewer/SkPdfReporter.h ('k') | experimental/PdfViewer/SkPdfUtils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8
9 #include "SkPdfReporter.h" 9 #include "SkPdfReporter.h"
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 const char* getSeverityName(SkPdfIssueSeverity sev) { 22 const char* getSeverityName(SkPdfIssueSeverity sev) {
23 if (0 <= sev && sev < _kCount__SkPdfIssueSeverity) { 23 if (0 <= sev && sev < _kCount__SkPdfIssueSeverity) {
24 return severityName[sev]; 24 return severityName[sev];
25 } 25 }
26 SkASSERT(false); 26 SkASSERT(false);
27 return "UNKOWN SEVERITY"; 27 return "UNKOWN SEVERITY";
28 } 28 }
29 29
30 // TODO(edisonn): add a flag to set the minimum warning level 30 // TODO(edisonn): add a flag to set the minimum warning level
31 // TODO(edisonn): get the address in the file, and report it.
32 // TODO(edisonn): build a html file based on warnings which would showe the orig inal pdf
33 // content, with tooltips where warnings/errors were reported.
34
31 35
32 #ifdef PDF_REPORT 36 #ifdef PDF_REPORT
33 void SkPdfReport(SkPdfIssueSeverity sev, SkPdfIssue issue, 37 void SkPdfReport(SkPdfIssueSeverity sev, SkPdfIssue issue,
34 const char* context, 38 const char* context,
35 const SkPdfNativeObject* obj, 39 const SkPdfNativeObject* obj,
36 SkPdfContext* pdfContext) { 40 SkPdfContext* pdfContext) {
37 if (sev >= kIgnoreError_SkPdfIssueSeverity) { 41 if (sev >= kIgnoreError_SkPdfIssueSeverity) {
38 printf("%s: %s\n", getSeverityName(sev), context); 42 printf("%s: %s\n", getSeverityName(sev), context);
39 } 43 }
40 } 44 }
(...skipping 12 matching lines...) Expand all
53 void SkPdfReportUnexpectedType(SkPdfIssueSeverity sev, 57 void SkPdfReportUnexpectedType(SkPdfIssueSeverity sev,
54 const char* context, 58 const char* context,
55 const SkPdfNativeObject* obj, 59 const SkPdfNativeObject* obj,
56 int anyOfTypes, SkPdfContext* pdfContext) { 60 int anyOfTypes, SkPdfContext* pdfContext) {
57 if (sev >= kIgnoreError_SkPdfIssueSeverity) { 61 if (sev >= kIgnoreError_SkPdfIssueSeverity) {
58 printf("%s: %s\n", getSeverityName(sev), context); 62 printf("%s: %s\n", getSeverityName(sev), context);
59 } 63 }
60 } 64 }
61 65
62 #endif // PDF_REPORT 66 #endif // PDF_REPORT
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfReporter.h ('k') | experimental/PdfViewer/SkPdfUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698