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

Unified Diff: src/core/SkPicture.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/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index dfedd141db0f85a08b5c2e1bffb62fe95c83e80c..b4a6375c051322d2d3cb553c9d9fec920b30d7c6 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -207,15 +207,15 @@ void SkPicture::flatten(SkWriteBuffer& buffer) const {
SkPictInfo info = this->createHeader();
SkAutoTDelete<SkPictureData> data(this->backport());
- buffer.writeByteArray(&info.fMagic, sizeof(info.fMagic));
- buffer.writeUInt(info.fVersion);
- buffer.writeRect(info.fCullRect);
- buffer.writeUInt(info.fFlags);
+ buffer.writeByteArray("fMagic", &info.fMagic, sizeof(info.fMagic));
+ buffer.writeUInt("fVersion", info.fVersion);
+ buffer.writeRect("fCullRect", info.fCullRect);
+ buffer.writeUInt("fFlags", info.fFlags);
if (data) {
- buffer.writeBool(true);
+ buffer.writeBool("dataValid", true);
data->flatten(buffer);
} else {
- buffer.writeBool(false);
+ buffer.writeBool("dataValid", false);
}
}

Powered by Google App Engine
This is Rietveld 408576698