Index: src/pdf/SkPDFImage.cpp |
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp |
index 3c0d850fda9d1d0273e280d13452c3a239aa521a..0b6c81f77a382a6cded9bdc61db3b27f8f623e76 100644 |
--- a/src/pdf/SkPDFImage.cpp |
+++ b/src/pdf/SkPDFImage.cpp |
@@ -630,9 +630,14 @@ bool SkPDFImage::populate(SkPDFCatalog* catalog) { |
fStreamValid = true; |
} |
return INHERITED::populate(catalog); |
- } else if (getState() == kNoCompression_State && |
- !skip_compression(catalog) && |
- (SkFlate::HaveFlate() || fEncoder)) { |
+ } |
+#ifndef SK_NO_FLATE |
+ else if (getState() == kNoCompression_State && !skip_compression(catalog)) { |
+#else // SK_NO_FLATE |
+ else if (getState() == kNoCompression_State && |
+ !skip_compression(catalog) && |
+ fEncoder) { |
+#endif // SK_NO_FLATE |
// Compression has not been requested when the stream was first created, |
// but the new catalog wants it compressed. |
if (!getSubstitute()) { |