OLD | NEW |
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 Loading... |
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 |
OLD | NEW |