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

Side by Side Diff: src/gpu/GrStyle.h

Issue 2042813002: Make GrShape track the winding direction and starting point for rrect types. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fix more MSVS warnings Created 4 years, 6 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/GrShape.cpp ('k') | tests/GrShapeTest.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 2016 Google Inc. 2 * Copyright 2016 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 #ifndef GrStyle_DEFINED 8 #ifndef GrStyle_DEFINED
9 #define GrStyle_DEFINED 9 #define GrStyle_DEFINED
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 /** Is this style a fill with no path effect? */ 110 /** Is this style a fill with no path effect? */
111 bool isSimpleFill() const { return fStrokeRec.isFillStyle() && !fPathEffect; } 111 bool isSimpleFill() const { return fStrokeRec.isFillStyle() && !fPathEffect; }
112 112
113 /** Is this style a hairline with no path effect? */ 113 /** Is this style a hairline with no path effect? */
114 bool isSimpleHairline() const { return fStrokeRec.isHairlineStyle() && !fPat hEffect; } 114 bool isSimpleHairline() const { return fStrokeRec.isHairlineStyle() && !fPat hEffect; }
115 115
116 SkPathEffect* pathEffect() const { return fPathEffect.get(); } 116 SkPathEffect* pathEffect() const { return fPathEffect.get(); }
117 117
118 bool hasPathEffect() const { return SkToBool(fPathEffect.get()); }
119
118 bool hasNonDashPathEffect() const { return fPathEffect.get() && !this->isDas hed(); } 120 bool hasNonDashPathEffect() const { return fPathEffect.get() && !this->isDas hed(); }
119 121
120 bool isDashed() const { return SkPathEffect::kDash_DashType == fDashInfo.fTy pe; } 122 bool isDashed() const { return SkPathEffect::kDash_DashType == fDashInfo.fTy pe; }
121 SkScalar dashPhase() const { 123 SkScalar dashPhase() const {
122 SkASSERT(this->isDashed()); 124 SkASSERT(this->isDashed());
123 return fDashInfo.fPhase; 125 return fDashInfo.fPhase;
124 } 126 }
125 int dashIntervalCnt() const { 127 int dashIntervalCnt() const {
126 SkASSERT(this->isDashed()); 128 SkASSERT(this->isDashed());
127 return fDashInfo.fIntervals.count(); 129 return fDashInfo.fIntervals.count();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 SkScalar fPhase; 200 SkScalar fPhase;
199 SkAutoSTArray<4, SkScalar> fIntervals; 201 SkAutoSTArray<4, SkScalar> fIntervals;
200 }; 202 };
201 203
202 SkStrokeRec fStrokeRec; 204 SkStrokeRec fStrokeRec;
203 sk_sp<SkPathEffect> fPathEffect; 205 sk_sp<SkPathEffect> fPathEffect;
204 DashInfo fDashInfo; 206 DashInfo fDashInfo;
205 }; 207 };
206 208
207 #endif 209 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrShape.cpp ('k') | tests/GrShapeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698