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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1911963008: DNC - JSON of flattenables, with field names. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add names to call sites Created 4 years, 8 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
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 4128ba6cc20199f4489debfeb11a09add85609bc..4eac0b55759d055244533ae96acf791414ce3652 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -193,16 +193,16 @@ SkImageFilter::SkImageFilter(int inputCount, SkReadBuffer& buffer)
}
void SkImageFilter::flatten(SkWriteBuffer& buffer) const {
- buffer.writeInt(fInputs.count());
+ buffer.writeInt("inputCount", fInputs.count());
for (int i = 0; i < fInputs.count(); i++) {
SkImageFilter* input = this->getInput(i);
- buffer.writeBool(input != nullptr);
+ buffer.writeBool("inputValid", input != nullptr);
if (input != nullptr) {
- buffer.writeFlattenable(input);
+ buffer.writeFlattenable(SK_STRING_AND_VALUE(input));
}
}
- buffer.writeRect(fCropRect.rect());
- buffer.writeUInt(fCropRect.flags());
+ buffer.writeRect("fCropRect", fCropRect.rect());
+ buffer.writeUInt("fCropRectFlags", fCropRect.flags());
}
sk_sp<SkSpecialImage> SkImageFilter::filterImage(SkSpecialImage* src, const Context& context,

Powered by Google App Engine
This is Rietveld 408576698