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

Side by Side Diff: src/effects/SkTestImageFilters.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 2011 Google Inc. 2 * Copyright 2011 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 "SkTestImageFilters.h" 8 #include "SkTestImageFilters.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 } 92 }
93 93
94 sk_sp<SkFlattenable> SkDownSampleImageFilter::CreateProc(SkReadBuffer& buffer) { 94 sk_sp<SkFlattenable> SkDownSampleImageFilter::CreateProc(SkReadBuffer& buffer) {
95 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 95 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
96 return Make(buffer.readScalar(), common.getInput(0)); 96 return Make(buffer.readScalar(), common.getInput(0));
97 } 97 }
98 98
99 void SkDownSampleImageFilter::flatten(SkWriteBuffer& buffer) const { 99 void SkDownSampleImageFilter::flatten(SkWriteBuffer& buffer) const {
100 this->INHERITED::flatten(buffer); 100 this->INHERITED::flatten(buffer);
101 buffer.writeScalar(fScale); 101 buffer.writeScalar("fScale", fScale);
102 } 102 }
103 103
104 #ifndef SK_IGNORE_TO_STRING 104 #ifndef SK_IGNORE_TO_STRING
105 void SkDownSampleImageFilter::toString(SkString* str) const { 105 void SkDownSampleImageFilter::toString(SkString* str) const {
106 str->appendf("SkDownSampleImageFilter: ("); 106 str->appendf("SkDownSampleImageFilter: (");
107 str->append(")"); 107 str->append(")");
108 } 108 }
109 #endif 109 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698