Bump picture version for uniqueID-less SkImageFilter.
Remove writing of the uniqueID, and put reading behind a version check.
BUG=skia:3559
Review URL: https://codereview.chromium.org/1010433003
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 0cb954c..f1553e2 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -100,9 +100,10 @@
uint32_t flags = buffer.readUInt();
fCropRect = CropRect(rect, flags);
- // FIXME: this is now unused; and should be made conditional on the next SkPicture version bump.
- // See skbug.com/3559.
- (void) buffer.readUInt();
+ if (buffer.isVersionLT(SkReadBuffer::kImageFilterNoUniqueID_Version)) {
+
+ (void) buffer.readUInt();
+ }
return buffer.isValid();
}
@@ -161,9 +162,6 @@
}
buffer.writeRect(fCropRect.rect());
buffer.writeUInt(fCropRect.flags());
- // FIXME: this is now unused; and should be removed on the next SkPicture version bump.
- // See skbug.com/3559.
- buffer.writeUInt(0);
}
bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h
index a24ca55..65255e6 100644
--- a/src/core/SkReadBuffer.h
+++ b/src/core/SkReadBuffer.h
@@ -55,6 +55,7 @@
kDropShadowMode_Version = 37,
kPictureImageFilterResolution_Version = 38,
kPictureImageFilterLevel_Version = 39,
+ kImageFilterNoUniqueID_Version = 40,
};
/**