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

Side by Side Diff: src/effects/SkDiscretePathEffect.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/effects/SkDashPathEffect.cpp ('k') | src/utils/SkDashPath.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 "SkDiscretePathEffect.h" 10 #include "SkDiscretePathEffect.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 static void Perterb(SkPoint* p, const SkVector& tangent, SkScalar scale) { 16 static void Perterb(SkPoint* p, const SkVector& tangent, SkScalar scale) {
16 SkVector normal = tangent; 17 SkVector normal = tangent;
17 normal.rotateCCW(); 18 normal.rotateCCW();
18 normal.setLength(scale); 19 normal.setLength(scale);
19 *p += normal; 20 *p += normal;
20 } 21 }
21 22
22 SkDiscretePathEffect::SkDiscretePathEffect(SkScalar segLength, 23 SkDiscretePathEffect::SkDiscretePathEffect(SkScalar segLength,
23 SkScalar deviation, 24 SkScalar deviation,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 buffer.writeUInt(fSeedAssist); 130 buffer.writeUInt(fSeedAssist);
130 } 131 }
131 132
132 #ifndef SK_IGNORE_TO_STRING 133 #ifndef SK_IGNORE_TO_STRING
133 void SkDiscretePathEffect::toString(SkString* str) const { 134 void SkDiscretePathEffect::toString(SkString* str) const {
134 str->appendf("SkDiscretePathEffect: ("); 135 str->appendf("SkDiscretePathEffect: (");
135 str->appendf("segLength: %.2f deviation: %.2f seed %d", fSegLength, fPerterb , fSeedAssist); 136 str->appendf("segLength: %.2f deviation: %.2f seed %d", fSegLength, fPerterb , fSeedAssist);
136 str->append(")"); 137 str->append(")");
137 } 138 }
138 #endif 139 #endif
OLDNEW
« no previous file with comments | « src/effects/SkDashPathEffect.cpp ('k') | src/utils/SkDashPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698