aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/effects/SkPictureImageFilter.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index a2f558f202..af9466f977 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);
}