Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: src/core/SkImageFilter.cpp

Issue 1019493002: Remove uniqueID from all filter serialization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Null out fUniqueID deserialization Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 2837b7c84e276729d809be9c3b21ccbef7c5777b..0cb954ceff2742442b46edda0f626f1b4486310c 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -100,18 +100,20 @@ bool SkImageFilter::Common::unflatten(SkReadBuffer& buffer, int expectedCount) {
uint32_t flags = buffer.readUInt();
fCropRect = CropRect(rect, flags);
- fUniqueID = buffer.readUInt();
+ // FIXME: this is now unused; and should be made conditional on the next SkPicture version bump.
+ // See skbug.com/3559.
+ (void) buffer.readUInt();
return buffer.isValid();
}
///////////////////////////////////////////////////////////////////////////////////////////////////
-SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect, uint32_t uniqueID)
+SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect)
: fInputCount(inputCount),
fInputs(new SkImageFilter*[inputCount]),
fUsesSrcInput(false),
fCropRect(cropRect ? *cropRect : CropRect(SkRect(), 0x0)),
- fUniqueID(uniqueID ? uniqueID : next_image_filter_unique_id()) {
+ fUniqueID(next_image_filter_unique_id()) {
for (int i = 0; i < inputCount; ++i) {
if (NULL == inputs[i] || inputs[i]->usesSrcInput()) {
fUsesSrcInput = true;
@@ -129,7 +131,8 @@ SkImageFilter::~SkImageFilter() {
}
SkImageFilter::SkImageFilter(int inputCount, SkReadBuffer& buffer)
- : fUsesSrcInput(false) {
+ : fUsesSrcInput(false)
+ , fUniqueID(next_image_filter_unique_id()) {
Common common;
if (common.unflatten(buffer, inputCount)) {
fCropRect = common.cropRect();
@@ -141,7 +144,6 @@ SkImageFilter::SkImageFilter(int inputCount, SkReadBuffer& buffer)
fUsesSrcInput = true;
}
}
- fUniqueID = buffer.isCrossProcess() ? next_image_filter_unique_id() : common.uniqueID();
} else {
fInputCount = 0;
fInputs = NULL;
@@ -159,7 +161,9 @@ void SkImageFilter::flatten(SkWriteBuffer& buffer) const {
}
buffer.writeRect(fCropRect.rect());
buffer.writeUInt(fCropRect.flags());
- buffer.writeUInt(fUniqueID);
+ // 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,
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698