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

Unified Diff: src/effects/SkLayerDrawLooper.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/effects/SkLayerDrawLooper.cpp
diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp
index d8f774437e5b77a8e47b3cc5eb6a469760e1318a..ef27082d6d34988efbc49391ea5e470b0d46d6fe 100644
--- a/src/effects/SkLayerDrawLooper.cpp
+++ b/src/effects/SkLayerDrawLooper.cpp
@@ -198,18 +198,18 @@ bool SkLayerDrawLooper::asABlurShadow(BlurShadowRec* bsRec) const {
///////////////////////////////////////////////////////////////////////////////
void SkLayerDrawLooper::flatten(SkWriteBuffer& buffer) const {
- buffer.writeInt(fCount);
+ buffer.writeInt("fCount", fCount);
Rec* rec = fRecs;
for (int i = 0; i < fCount; i++) {
// Legacy "flagsmask" field -- now ignored, remove when we bump version
- buffer.writeInt(0);
+ buffer.writeInt("flagsmask", 0);
- buffer.writeInt(rec->fInfo.fPaintBits);
- buffer.writeInt(rec->fInfo.fColorMode);
- buffer.writePoint(rec->fInfo.fOffset);
- buffer.writeBool(rec->fInfo.fPostTranslate);
- buffer.writePaint(rec->fPaint);
+ buffer.writeInt("fPaintBits", rec->fInfo.fPaintBits);
+ buffer.writeInt("fColorMode", rec->fInfo.fColorMode);
+ buffer.writePoint("fOffset", rec->fInfo.fOffset);
+ buffer.writeBool("fPostTranslate", rec->fInfo.fPostTranslate);
+ buffer.writePaint("fPaint", rec->fPaint);
rec = rec->fNext;
}
}

Powered by Google App Engine
This is Rietveld 408576698