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

Unified Diff: src/core/SkPictureShader.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/SkPictureShader.cpp
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index b6f4d02a55b1cc4a2b4c814d248eee5c8ebb008d..e83d11870337486b362a3ccea0af607549a04e30 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -140,17 +140,17 @@ sk_sp<SkFlattenable> SkPictureShader::CreateProc(SkReadBuffer& buffer) {
}
void SkPictureShader::flatten(SkWriteBuffer& buffer) const {
- buffer.writeMatrix(this->getLocalMatrix());
- buffer.write32(fTmx);
- buffer.write32(fTmy);
- buffer.writeRect(fTile);
+ buffer.writeMatrix("localMatrix", this->getLocalMatrix());
+ buffer.write32("fTmx", fTmx);
+ buffer.write32("fTmy", fTmy);
+ buffer.writeRect("fTile", fTile);
// The deserialization code won't trust that our serialized picture is safe to deserialize.
// So write a 'false' telling it that we're not serializing a picture.
if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) {
- buffer.writeBool(false);
+ buffer.writeBool("picturePresent", false);
} else {
- buffer.writeBool(true);
+ buffer.writeBool("picturePresent", true);
fPicture->flatten(buffer);
}
}

Powered by Google App Engine
This is Rietveld 408576698