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

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

Issue 1312163008: Forward declare SkStrokeRec in SkPathEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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/core/SkScalerContext.cpp ('k') | src/effects/Sk2DPathEffect.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "Sk1DPathEffect.h" 10 #include "Sk1DPathEffect.h"
11 #include "SkReadBuffer.h" 11 #include "SkReadBuffer.h"
12 #include "SkWriteBuffer.h" 12 #include "SkWriteBuffer.h"
13 #include "SkPathMeasure.h" 13 #include "SkPathMeasure.h"
14 #include "SkStrokeRec.h"
14 15
15 bool Sk1DPathEffect::filterPath(SkPath* dst, const SkPath& src, 16 bool Sk1DPathEffect::filterPath(SkPath* dst, const SkPath& src,
16 SkStrokeRec*, const SkRect*) const { 17 SkStrokeRec*, const SkRect*) const {
17 SkPathMeasure meas(src, false); 18 SkPathMeasure meas(src, false);
18 do { 19 do {
19 SkScalar length = meas.getLength(); 20 SkScalar length = meas.getLength();
20 SkScalar distance = this->begin(length); 21 SkScalar distance = this->begin(length);
21 while (distance < length) { 22 while (distance < length) {
22 SkScalar delta = this->next(dst, distance, meas); 23 SkScalar delta = this->next(dst, distance, meas);
23 if (delta <= 0) { 24 if (delta <= 0) {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 201
201 #ifndef SK_IGNORE_TO_STRING 202 #ifndef SK_IGNORE_TO_STRING
202 void SkPath1DPathEffect::toString(SkString* str) const { 203 void SkPath1DPathEffect::toString(SkString* str) const {
203 str->appendf("SkPath1DPathEffect: ("); 204 str->appendf("SkPath1DPathEffect: (");
204 // TODO: add path and style 205 // TODO: add path and style
205 str->appendf("advance: %.2f phase %.2f", fAdvance, fInitialOffset); 206 str->appendf("advance: %.2f phase %.2f", fAdvance, fInitialOffset);
206 str->appendf(")"); 207 str->appendf(")");
207 } 208 }
208 #endif 209 #endif
OLDNEW
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/effects/Sk2DPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698