Index: src/effects/SkPictureImageFilter.cpp |
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp |
index cb61cdd1b82eca1b05a3efe3c62cdf3ee5f2eb3f..91f4dc9f29756fc4c9008da3af0a35464b7b9311 100644 |
--- a/src/effects/SkPictureImageFilter.cpp |
+++ b/src/effects/SkPictureImageFilter.cpp |
@@ -39,12 +39,9 @@ SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) { |
SkAutoTUnref<SkPicture> picture; |
SkRect cropRect; |
-#ifdef SK_DISALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS |
- if (buffer.isCrossProcess()) { |
+ if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) { |
buffer.validate(!buffer.readBool()); |
- } else |
-#endif |
- { |
+ } else { |
if (buffer.readBool()) { |
picture.reset(SkPicture::CreateFromBuffer(buffer)); |
} |
@@ -71,12 +68,9 @@ SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) { |
} |
void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const { |
-#ifdef SK_DISALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS |
- if (buffer.isCrossProcess()) { |
+ if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) { |
buffer.writeBool(false); |
- } else |
-#endif |
- { |
+ } else { |
bool hasPicture = (fPicture != NULL); |
buffer.writeBool(hasPicture); |
if (hasPicture) { |