Index: src/effects/SkPictureImageFilter.cpp |
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp |
index 37d86ce0d2be256bd82e12fcdda26d8f8326823c..391af1116927aca5903923a65b28aa780e52f5ed 100644 |
--- a/src/effects/SkPictureImageFilter.cpp |
+++ b/src/effects/SkPictureImageFilter.cpp |
@@ -39,12 +39,15 @@ SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) { |
SkAutoTUnref<SkPicture> picture; |
SkRect cropRect; |
- if (!buffer.isCrossProcess()) { |
+#ifdef SK_DISALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS |
+ if (buffer.isCrossProcess()) { |
+ buffer.validate(!buffer.readBool()); |
+ } else |
+#endif |
+ { |
if (buffer.readBool()) { |
picture.reset(SkPicture::CreateFromBuffer(buffer)); |
} |
- } else { |
- buffer.validate(!buffer.readBool()); |
} |
buffer.readRect(&cropRect); |
PictureResolution pictureResolution; |
@@ -68,14 +71,17 @@ SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) { |
} |
void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const { |
- if (!buffer.isCrossProcess()) { |
+#ifdef SK_DISALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS |
+ if (buffer.isCrossProcess()) { |
+ buffer.writeBool(false); |
+ } else |
+#endif |
+ { |
bool hasPicture = (fPicture != NULL); |
buffer.writeBool(hasPicture); |
if (hasPicture) { |
fPicture->flatten(buffer); |
} |
- } else { |
- buffer.writeBool(false); |
} |
buffer.writeRect(fCropRect); |
buffer.writeInt(fPictureResolution); |