Lines Matching refs:style
4 * Use of this source code is governed by a BSD-style license that can be
11 int GrStyle::KeySize(const GrStyle &style, Apply apply, uint32_t flags) {
14 if (style.isDashed()) {
16 size += 2 + style.dashIntervalCnt();
17 } else if (style.pathEffect()) {
26 if (style.strokeRec().needToApply()) {
27 // One for res scale, one for style/cap/join, one for miter limit, and one for width.
33 void GrStyle::WriteKey(uint32_t *key, const GrStyle &style, Apply apply, SkScalar scale,
36 SkASSERT(KeySize(style, apply) >= 0);
46 if (style.isDashed()) {
47 static_assert(sizeof(style.dashPhase()) == sizeof(uint32_t));
48 SkScalar phase = style.dashPhase();
52 int32_t count = style.dashIntervalCnt();
55 const SkScalar *intervals = style.dashIntervals();
60 SkASSERT(!style.pathEffect());
63 if (Apply::kPathEffectAndStrokeRec == apply && style.strokeRec().needToApply()) {
79 if (!(flags & kClosed_KeyFlag) || style.pathEffect()) {
80 cap = style.strokeRec().getCap();
86 if (!(flags & kNoJoins_KeyFlag) || style.hasNonDashPathEffect()) {
87 join = style.strokeRec().getJoin();
90 miter = style.strokeRec().getMiter();
94 key[i++] = style.strokeRec().getStyle() |
100 SkScalar width = style.strokeRec().getWidth();
103 SkASSERT(KeySize(style, apply) == i);
175 bool GrStyle::applyToPath(SkPath* dst, SkStrokeRec::InitStyle* style, const SkPath& src,
177 SkASSERT(style);
192 *style = SkStrokeRec::kFill_InitStyle;
199 *style = strokeRec.getStyle() == SkStrokeRec::kFill_Style