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

Side by Side Diff: src/gpu/GrStrokeInfo.cpp

Issue 1128113008: Make GrStrokeInfo inherit from SkStrokeRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address review comments Created 5 years, 7 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/gpu/GrStrokeInfo.h ('k') | src/gpu/SkGpuDevice.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 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::applyDashToPath(SkPath* dst, GrStrokeInfo* dstStrokeInfo,
13 const SkPath& src) const {
13 if (this->isDashed()) { 14 if (this->isDashed()) {
14 SkPathEffect::DashInfo info; 15 SkPathEffect::DashInfo info;
15 info.fIntervals = fIntervals.get(); 16 info.fIntervals = fIntervals.get();
16 info.fCount = fIntervals.count(); 17 info.fCount = fIntervals.count();
17 info.fPhase = fDashPhase; 18 info.fPhase = fDashPhase;
18 SkStrokeRec strokeRec = fStroke; 19 GrStrokeInfo filteredStroke(*this, false);
19 if (SkDashPath::FilterDashPath(dst, src, &strokeRec, NULL, info)) { 20 if (SkDashPath::FilterDashPath(dst, src, &filteredStroke, NULL, info)) {
20 dstStrokeInfo->fStroke = strokeRec; 21 *dstStrokeInfo = filteredStroke;
21 dstStrokeInfo->removeDash();
22 return true; 22 return true;
23 } 23 }
24 } 24 }
25 return false; 25 return false;
26 } 26 }
OLDNEW
« no previous file with comments | « src/gpu/GrStrokeInfo.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698