Index: src/effects/SkPictureImageFilter.cpp |
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp |
index a2f558f20287ddf6bea74bc371bf2b4fdc090576..af9466f977620b243b9a0c7b3f17a7b62e75aa3e 100644 |
--- a/src/effects/SkPictureImageFilter.cpp |
+++ b/src/effects/SkPictureImageFilter.cpp |
@@ -34,27 +34,27 @@ SkPictureImageFilter::~SkPictureImageFilter() { |
SkPictureImageFilter::SkPictureImageFilter(SkReadBuffer& buffer) |
: INHERITED(0, buffer), |
fPicture(NULL) { |
-#ifdef SK_ALLOW_PICTUREIMAGEFILTER_SERIALIZATION |
- if (buffer.readBool()) { |
- fPicture = SkPicture::CreateFromBuffer(buffer); |
+ if (!buffer.isCrossProcess()) { |
+ if (buffer.readBool()) { |
+ fPicture = SkPicture::CreateFromBuffer(buffer); |
+ } |
+ } else { |
+ buffer.validate(!buffer.readBool()); |
} |
-#else |
- buffer.readBool(); |
-#endif |
buffer.readRect(&fCropRect); |
} |
void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const { |
this->INHERITED::flatten(buffer); |
-#ifdef SK_ALLOW_PICTUREIMAGEFILTER_SERIALIZATION |
- bool hasPicture = (fPicture != NULL); |
- buffer.writeBool(hasPicture); |
- if (hasPicture) { |
- fPicture->flatten(buffer); |
+ if (!buffer.isCrossProcess()) { |
+ bool hasPicture = (fPicture != NULL); |
+ buffer.writeBool(hasPicture); |
+ if (hasPicture) { |
+ fPicture->flatten(buffer); |
+ } |
+ } else { |
+ buffer.writeBool(false); |
} |
-#else |
- buffer.writeBool(false); |
-#endif |
buffer.writeRect(fCropRect); |
} |