From 4a22a433bfb972dcd96f76e3d3b0613c26d8fc86 Mon Sep 17 00:00:00 2001 From: senorblanco Date: Wed, 18 Mar 2015 13:14:54 -0700 Subject: 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 --- src/core/SkImageFilter.cpp | 10 ++++------ src/core/SkReadBuffer.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index 0cb954ceff..f1553e2ed1 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp @@ -100,9 +100,10 @@ bool SkImageFilter::Common::unflatten(SkReadBuffer& buffer, int expectedCount) { 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 @@ void SkImageFilter::flatten(SkWriteBuffer& buffer) const { } 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 a24ca557e8..65255e6f6a 100644 --- a/src/core/SkReadBuffer.h +++ b/src/core/SkReadBuffer.h @@ -55,6 +55,7 @@ public: kDropShadowMode_Version = 37, kPictureImageFilterResolution_Version = 38, kPictureImageFilterLevel_Version = 39, + kImageFilterNoUniqueID_Version = 40, }; /** -- cgit v1.2.3