diff options
author | senorblanco <senorblanco@chromium.org> | 2015-03-18 13:14:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-18 13:14:54 -0700 |
commit | 4a22a433bfb972dcd96f76e3d3b0613c26d8fc86 (patch) | |
tree | 6baa43fb84def25632b96bfc011066631183dae2 /src | |
parent | d803f2731f778317b46da64bce6e7a8a221ffccd (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkImageFilter.cpp | 10 | ||||
-rw-r--r-- | src/core/SkReadBuffer.h | 1 |
2 files changed, 5 insertions, 6 deletions
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, }; /** |