aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFImage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/SkPDFImage.cpp')
-rw-r--r--src/pdf/SkPDFImage.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp
index 3c0d850fda..0b6c81f77a 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()) {