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

Unified Diff: src/effects/Sk2DPathEffect.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/Sk2DPathEffect.cpp
diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp
index 52e3fa5e1c88b63d3f7c797a5ab736a7e8feb81f..1720362aa501f2e1157bec7fdd8b9793d9c53681 100644
--- a/src/effects/Sk2DPathEffect.cpp
+++ b/src/effects/Sk2DPathEffect.cpp
@@ -70,7 +70,7 @@ void Sk2DPathEffect::end(SkPath* dst) const {}
void Sk2DPathEffect::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
- buffer.writeMatrix(fMatrix);
+ buffer.writeMatrix("fMatrix", fMatrix);
}
#ifndef SK_IGNORE_TO_STRING
@@ -114,8 +114,8 @@ sk_sp<SkFlattenable> SkLine2DPathEffect::CreateProc(SkReadBuffer& buffer) {
}
void SkLine2DPathEffect::flatten(SkWriteBuffer &buffer) const {
- buffer.writeMatrix(this->getMatrix());
- buffer.writeScalar(fWidth);
+ buffer.writeMatrix("fMatrix", this->getMatrix());
+ buffer.writeScalar("fWidth", fWidth);
}
@@ -143,8 +143,8 @@ sk_sp<SkFlattenable> SkPath2DPathEffect::CreateProc(SkReadBuffer& buffer) {
}
void SkPath2DPathEffect::flatten(SkWriteBuffer& buffer) const {
- buffer.writeMatrix(this->getMatrix());
- buffer.writePath(fPath);
+ buffer.writeMatrix("fMatrix", this->getMatrix());
+ buffer.writePath("fPath", fPath);
}
void SkPath2DPathEffect::next(const SkPoint& loc, int u, int v,

Powered by Google App Engine
This is Rietveld 408576698