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

Unified Diff: experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp

Issue 23902018: pdfviewer: do not submit, uploaded for backup, and will be done actually after I refactor the param… Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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
Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp (revision 11117)
+++ experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp (working copy)
@@ -18,11 +18,13 @@
#include "SkBitmap.h"
#include "SkPdfFont.h"
+#include "SkPdfReporter.h"
+
SkPdfNativeObject SkPdfNativeObject::kNull = SkPdfNativeObject::makeNull(PUT_TRACK_PARAMETERS_SRC0);
bool SkPdfNativeObject::applyFlateDecodeFilter() {
if (!SkFlate::HaveFlate()) {
- // TODO(edisonn): warn, make callers handle it
+ SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kNoFlateLibrary_SkPdfIssue, "forgot to link with flate library?", NULL, NULL);
return false;
}
@@ -43,7 +45,7 @@
return true;
} else {
- // TODO(edisonn): warn, make callers handle it
+ SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kBadStream_SkPdfIssue, "inflate failed", this, NULL);
return false;
}
}
@@ -61,7 +63,7 @@
} else if (strcmp(name, "DCTDecode") == 0) {
return applyDCTDecodeFilter();
}
- // TODO(edisonn): allert, not supported, but should be implemented asap
+ SkPdfReport(kCodeWarning_SkPdfIssueSeverity, kNYI_SkPdfIssue, "filter not supported", this, NULL);
return false;
}
@@ -69,6 +71,7 @@
SkPdfMarkObjectUsed();
if (!hasStream()) {
+ SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kBadStream_SkPdfIssue, "No Stream", this, NULL);
return false;
}
@@ -93,7 +96,7 @@
break;
}
} else {
- // TODO(edisonn): report warning
+ SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kIncositentSyntax_SkPdfIssue, "filter name should be a Name", this, NULL);
}
}
}
@@ -102,7 +105,9 @@
}
void SkPdfNativeObject::releaseData() {
- // TODO(edisonn): report here unused objects
+#ifdef PDF_TRACK_OBJECT_USAGE
+ SkPdfReportIf(!fUsed, kInfo_SkPdfIssueSeverity, NULL, this, "Unused object in rendering");
+#endif // PDF_TRACK_OBJECT_USAGE
SkPdfMarkObjectUnused();

Powered by Google App Engine
This is Rietveld 408576698