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

Side by Side Diff: include/core/SkStrokeRec.h

Issue 1048333003: Set resScale on stroker when stroking path on gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 5 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 | « no previous file | src/gpu/GrContext.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 2012 Google Inc. 2 * Copyright 2012 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 SkStrokeRec_DEFINED 8 #ifndef SkStrokeRec_DEFINED
9 #define SkStrokeRec_DEFINED 9 #define SkStrokeRec_DEFINED
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 * strokeAndFill==false -> new style will be Hairline 57 * strokeAndFill==false -> new style will be Hairline
58 */ 58 */
59 void setStrokeStyle(SkScalar width, bool strokeAndFill = false); 59 void setStrokeStyle(SkScalar width, bool strokeAndFill = false);
60 60
61 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim it) { 61 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim it) {
62 fCap = cap; 62 fCap = cap;
63 fJoin = join; 63 fJoin = join;
64 fMiterLimit = miterLimit; 64 fMiterLimit = miterLimit;
65 } 65 }
66 66
67 void setResScale(SkScalar rs) {
68 SkASSERT(rs > 0 && SkScalarIsFinite(rs));
69 fResScale = rs;
70 }
71
67 /** 72 /**
68 * Returns true if this specifes any thick stroking, i.e. applyToPath() 73 * Returns true if this specifes any thick stroking, i.e. applyToPath()
69 * will return true. 74 * will return true.
70 */ 75 */
71 bool needToApply() const { 76 bool needToApply() const {
72 Style style = this->getStyle(); 77 Style style = this->getStyle();
73 return (kStroke_Style == style) || (kStrokeAndFill_Style == style); 78 return (kStroke_Style == style) || (kStrokeAndFill_Style == style);
74 } 79 }
75 80
76 /** 81 /**
(...skipping 26 matching lines...) Expand all
103 108
104 SkScalar fResScale; 109 SkScalar fResScale;
105 SkScalar fWidth; 110 SkScalar fWidth;
106 SkScalar fMiterLimit; 111 SkScalar fMiterLimit;
107 SkPaint::Cap fCap; 112 SkPaint::Cap fCap;
108 SkPaint::Join fJoin; 113 SkPaint::Join fJoin;
109 bool fStrokeAndFill; 114 bool fStrokeAndFill;
110 }; 115 };
111 116
112 #endif 117 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698