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/utils/SkDashPath.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT 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/utils/SkCullPoints.cpp ('k') | src/utils/SkDashPathPriv.h » ('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 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 #include "SkDashPathPriv.h" 8 #include "SkDashPathPriv.h"
9 #include "SkPathMeasure.h" 9 #include "SkPathMeasure.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 radius = SkScalarMul(radius, rec.getMiter()); 85 radius = SkScalarMul(radius, rec.getMiter());
86 } 86 }
87 rect->outset(radius, radius); 87 rect->outset(radius, radius);
88 } 88 }
89 89
90 // Only handles lines for now. If returns true, dstPath is the new (smaller) 90 // Only handles lines for now. If returns true, dstPath is the new (smaller)
91 // path. If returns false, then dstPath parameter is ignored. 91 // path. If returns false, then dstPath parameter is ignored.
92 static bool cull_path(const SkPath& srcPath, const SkStrokeRec& rec, 92 static bool cull_path(const SkPath& srcPath, const SkStrokeRec& rec,
93 const SkRect* cullRect, SkScalar intervalLength, 93 const SkRect* cullRect, SkScalar intervalLength,
94 SkPath* dstPath) { 94 SkPath* dstPath) {
95 if (NULL == cullRect) { 95 if (nullptr == cullRect) {
96 return false; 96 return false;
97 } 97 }
98 98
99 SkPoint pts[2]; 99 SkPoint pts[2];
100 if (!srcPath.isLine(pts)) { 100 if (!srcPath.isLine(pts)) {
101 return false; 101 return false;
102 } 102 }
103 103
104 SkRect bounds = *cullRect; 104 SkRect bounds = *cullRect;
105 outset_for_stroke(&bounds, rec); 105 outset_for_stroke(&bounds, rec);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 bool SkDashPath::FilterDashPath(SkPath* dst, const SkPath& src, SkStrokeRec* rec , 320 bool SkDashPath::FilterDashPath(SkPath* dst, const SkPath& src, SkStrokeRec* rec ,
321 const SkRect* cullRect, const SkPathEffect::Dash Info& info) { 321 const SkRect* cullRect, const SkPathEffect::Dash Info& info) {
322 SkScalar initialDashLength = 0; 322 SkScalar initialDashLength = 0;
323 int32_t initialDashIndex = 0; 323 int32_t initialDashIndex = 0;
324 SkScalar intervalLength = 0; 324 SkScalar intervalLength = 0;
325 CalcDashParameters(info.fPhase, info.fIntervals, info.fCount, 325 CalcDashParameters(info.fPhase, info.fIntervals, info.fCount,
326 &initialDashLength, &initialDashIndex, &intervalLength); 326 &initialDashLength, &initialDashIndex, &intervalLength);
327 return FilterDashPath(dst, src, rec, cullRect, info.fIntervals, info.fCount, initialDashLength, 327 return FilterDashPath(dst, src, rec, cullRect, info.fIntervals, info.fCount, initialDashLength,
328 initialDashIndex, intervalLength); 328 initialDashIndex, intervalLength);
329 } 329 }
OLDNEW
« no previous file with comments | « src/utils/SkCullPoints.cpp ('k') | src/utils/SkDashPathPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698