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

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

Issue 933523007: zlib/pdf: remove HaveFlate(), depend on preprocessor defines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | gyp/skflate.gyp » ('j') | gyp/skflate.gyp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp
diff --git a/experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp b/experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp
index d9b3c01201e314efe6a64b0981df11d2a5e6a2a7..adf9f712482e3c882409c9f9cfa1f7de5670ec24 100644
--- a/experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp
+++ b/experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp
@@ -22,12 +22,11 @@
SkPdfNativeObject SkPdfNativeObject::kNull = SkPdfNativeObject::makeNull();
bool SkPdfNativeObject::applyFlateDecodeFilter() {
- if (!SkFlate::HaveFlate()) {
- SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kNoFlateLibrary_SkPdfIssue,
- "forgot to link with flate library?", NULL, NULL);
- return false;
- }
-
+#ifdef SK_NO_FLATE
mtklein 2015/02/17 22:15:15 Just remove this? The code will fail to compile i
hal.canary 2015/02/17 22:35:44 Done.
+ SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kNoFlateLibrary_SkPdfIssue,
+ "forgot to link with flate library?", NULL, NULL);
+ return false;
+#else // !SK_NO_FLATE
const unsigned char* old = fStr.fBuffer;
bool deleteOld = isStreamOwned();
@@ -49,6 +48,7 @@ bool SkPdfNativeObject::applyFlateDecodeFilter() {
SkPdfReport(kIgnoreError_SkPdfIssueSeverity, kBadStream_SkPdfIssue, "inflate failed", this, NULL);
return false;
}
+#endif // !SK_NO_FLATE
}
bool SkPdfNativeObject::applyDCTDecodeFilter() {
« no previous file with comments | « no previous file | gyp/skflate.gyp » ('j') | gyp/skflate.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698