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

Side by Side Diff: src/effects/SkCornerPathEffect.cpp

Issue 1855733002: change flattenable factory to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkDashPathEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkDashPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698