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

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

Issue 1841123002: Reverse dependency between SkScalar.h and SkFixed.h (Closed) Base URL: https://skia.googlesource.com/skia@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/GrCircleBlurFragmentProcessor.cpp ('k') | src/effects/SkEmbossMask.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 "SkDiscretePathEffect.h" 9 #include "SkDiscretePathEffect.h"
10 #include "SkFixed.h"
11 #include "SkPathMeasure.h"
10 #include "SkReadBuffer.h" 12 #include "SkReadBuffer.h"
13 #include "SkStrokeRec.h"
11 #include "SkWriteBuffer.h" 14 #include "SkWriteBuffer.h"
12 #include "SkPathMeasure.h"
13 #include "SkStrokeRec.h"
14 15
15 sk_sp<SkPathEffect> SkDiscretePathEffect::Make(SkScalar segLength, SkScalar devi ation, 16 sk_sp<SkPathEffect> SkDiscretePathEffect::Make(SkScalar segLength, SkScalar devi ation,
16 uint32_t seedAssist) { 17 uint32_t seedAssist) {
17 return sk_sp<SkPathEffect>(new SkDiscretePathEffect(segLength, deviation, se edAssist)); 18 return sk_sp<SkPathEffect>(new SkDiscretePathEffect(segLength, deviation, se edAssist));
18 } 19 }
19 20
20 static void Perterb(SkPoint* p, const SkVector& tangent, SkScalar scale) { 21 static void Perterb(SkPoint* p, const SkVector& tangent, SkScalar scale) {
21 SkVector normal = tangent; 22 SkVector normal = tangent;
22 normal.rotateCCW(); 23 normal.rotateCCW();
23 normal.setLength(scale); 24 normal.setLength(scale);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 buffer.writeUInt(fSeedAssist); 135 buffer.writeUInt(fSeedAssist);
135 } 136 }
136 137
137 #ifndef SK_IGNORE_TO_STRING 138 #ifndef SK_IGNORE_TO_STRING
138 void SkDiscretePathEffect::toString(SkString* str) const { 139 void SkDiscretePathEffect::toString(SkString* str) const {
139 str->appendf("SkDiscretePathEffect: ("); 140 str->appendf("SkDiscretePathEffect: (");
140 str->appendf("segLength: %.2f deviation: %.2f seed %d", fSegLength, fPerterb , fSeedAssist); 141 str->appendf("segLength: %.2f deviation: %.2f seed %d", fSegLength, fPerterb , fSeedAssist);
141 str->append(")"); 142 str->append(")");
142 } 143 }
143 #endif 144 #endif
OLDNEW
« no previous file with comments | « src/effects/GrCircleBlurFragmentProcessor.cpp ('k') | src/effects/SkEmbossMask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698