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

Side by Side Diff: src/effects/SkTileImageFilter.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTileImageFilter.h" 8 #include "SkTileImageFilter.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 sk_sp<SkFlattenable> SkTileImageFilter::CreateProc(SkReadBuffer& buffer) { 141 sk_sp<SkFlattenable> SkTileImageFilter::CreateProc(SkReadBuffer& buffer) {
142 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 142 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
143 SkRect src, dst; 143 SkRect src, dst;
144 buffer.readRect(&src); 144 buffer.readRect(&src);
145 buffer.readRect(&dst); 145 buffer.readRect(&dst);
146 return Make(src, dst, common.getInput(0)); 146 return Make(src, dst, common.getInput(0));
147 } 147 }
148 148
149 void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const { 149 void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const {
150 this->INHERITED::flatten(buffer); 150 this->INHERITED::flatten(buffer);
151 buffer.writeRect(fSrcRect); 151 buffer.writeRect("fSrcRect", fSrcRect);
152 buffer.writeRect(fDstRect); 152 buffer.writeRect("fDstRect", fDstRect);
153 } 153 }
154 154
155 #ifndef SK_IGNORE_TO_STRING 155 #ifndef SK_IGNORE_TO_STRING
156 void SkTileImageFilter::toString(SkString* str) const { 156 void SkTileImageFilter::toString(SkString* str) const {
157 str->appendf("SkTileImageFilter: ("); 157 str->appendf("SkTileImageFilter: (");
158 str->appendf("src: %.2f %.2f %.2f %.2f", 158 str->appendf("src: %.2f %.2f %.2f %.2f",
159 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m); 159 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m);
160 str->appendf(" dst: %.2f %.2f %.2f %.2f", 160 str->appendf(" dst: %.2f %.2f %.2f %.2f",
161 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m); 161 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m);
162 if (this->getInput(0)) { 162 if (this->getInput(0)) {
163 str->appendf("input: ("); 163 str->appendf("input: (");
164 this->getInput(0)->toString(str); 164 this->getInput(0)->toString(str);
165 str->appendf(")"); 165 str->appendf(")");
166 } 166 }
167 str->append(")"); 167 str->append(")");
168 } 168 }
169 #endif 169 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698