OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 #include "SkCornerPathEffect.h" | 9 #include "SkCornerPathEffect.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 if (SkPath::kMove_Verb == prevVerb) { | 132 if (SkPath::kMove_Verb == prevVerb) { |
133 firstStep = step; | 133 firstStep = step; |
134 } | 134 } |
135 prevVerb = verb; | 135 prevVerb = verb; |
136 } | 136 } |
137 DONE: | 137 DONE: |
138 return true; | 138 return true; |
139 } | 139 } |
140 | 140 |
141 SkFlattenable* SkCornerPathEffect::CreateProc(SkReadBuffer& buffer) { | 141 sk_sp<SkFlattenable> SkCornerPathEffect::CreateProc(SkReadBuffer& buffer) { |
142 return SkCornerPathEffect::Make(buffer.readScalar()).release(); | 142 return SkCornerPathEffect::Make(buffer.readScalar()); |
143 } | 143 } |
144 | 144 |
145 void SkCornerPathEffect::flatten(SkWriteBuffer& buffer) const { | 145 void SkCornerPathEffect::flatten(SkWriteBuffer& buffer) const { |
146 buffer.writeScalar(fRadius); | 146 buffer.writeScalar(fRadius); |
147 } | 147 } |
148 | 148 |
149 #ifndef SK_IGNORE_TO_STRING | 149 #ifndef SK_IGNORE_TO_STRING |
150 void SkCornerPathEffect::toString(SkString* str) const { | 150 void SkCornerPathEffect::toString(SkString* str) const { |
151 str->appendf("SkCornerPathEffect: ("); | 151 str->appendf("SkCornerPathEffect: ("); |
152 str->appendf("radius: %.2f", fRadius); | 152 str->appendf("radius: %.2f", fRadius); |
153 str->appendf(")"); | 153 str->appendf(")"); |
154 } | 154 } |
155 #endif | 155 #endif |
OLD | NEW |