OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrStrokeInfo.h" | 8 #include "GrStrokeInfo.h" |
9 | 9 |
10 #include "SkDashPathPriv.h" | 10 #include "SkDashPathPriv.h" |
11 | 11 |
12 bool GrStrokeInfo::applyDash(SkPath* dst, GrStrokeInfo* dstStrokeInfo, const SkP
ath& src) const { | 12 bool GrStrokeInfo::applyDash(SkPath* dst, GrStrokeInfo* dstStrokeInfo, const SkP
ath& src) const { |
13 if (this->isDashed()) { | 13 if (this->isDashed()) { |
14 const SkPathEffect::DashInfo& info = this->getDashInfo(); | 14 SkPathEffect::DashInfo info; |
| 15 info.fIntervals = fIntervals.get(); |
| 16 info.fCount = fIntervals.count(); |
| 17 info.fPhase = fDashPhase; |
15 SkStrokeRec strokeRec = fStroke; | 18 SkStrokeRec strokeRec = fStroke; |
16 if (SkDashPath::FilterDashPath(dst, src, &strokeRec, NULL, info)) { | 19 if (SkDashPath::FilterDashPath(dst, src, &strokeRec, NULL, info)) { |
17 dstStrokeInfo->fStroke = strokeRec; | 20 dstStrokeInfo->fStroke = strokeRec; |
18 dstStrokeInfo->removeDash(); | 21 dstStrokeInfo->removeDash(); |
19 return true; | 22 return true; |
20 } | 23 } |
21 } | 24 } |
22 return false; | 25 return false; |
23 } | 26 } |
OLD | NEW |