12 static_assert(
sizeof(uint32_t) ==
sizeof(
SkScalar));
37 static_assert(
sizeof(uint32_t) ==
sizeof(
SkScalar));
47 static_assert(
sizeof(style.
dashPhase()) ==
sizeof(uint32_t));
57 memcpy(&
key[i], intervals, intervalByteCnt);
68 kCapBits = 32 - kStyleBits - kJoinBits,
70 kJoinShift = kStyleBits,
71 kCapShift = kJoinShift + kJoinBits,
98 memcpy(&
key[i++], &miter,
sizeof(miter));
109 SkASSERT(0 == fDashInfo.fIntervals.count());
118 fDashInfo.fIntervals.reset(
info.fCount);
119 fDashInfo.fPhase =
info.fPhase;
120 info.fIntervals = fDashInfo.fIntervals.get();
122 fPathEffect = std::move(pe);
125 fPathEffect = std::move(pe);
143 const SkScalar* intervals = fDashInfo.fIntervals.get();
144 int intervalCnt = fDashInfo.fIntervals.count();
149 &initialIndex, &intervalLength);
151 nullptr, intervals, intervalCnt,
152 initialLength, initialIndex, intervalLength, phase,
159 dst->setIsVolatile(
true);
168 if (!this->applyPathEffect(dst, &
strokeRec, src)) {
181 const SkPath* pathForStrokeRec = &src;
182 if (this->applyPathEffect(dst, &
strokeRec, src)) {
183 pathForStrokeRec = dst;
184 }
else if (fPathEffect) {
191 dst->setIsVolatile(
true);
193 }
else if (!fPathEffect) {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static bool apply(Pass *pass, SkRecord *record)
const SkScalar * dashIntervals() const
@ kPathEffectAndStrokeRec
bool applyToPath(SkPath *dst, SkStrokeRec::InitStyle *fillOrHairline, const SkPath &src, SkScalar scale) const
SkPathEffect * pathEffect() const
static void WriteKey(uint32_t *, const GrStyle &, Apply, SkScalar scale, uint32_t flags=0)
bool hasNonDashPathEffect() const
int dashIntervalCnt() const
bool applyPathEffectToPath(SkPath *dst, SkStrokeRec *remainingStoke, const SkPath &src, SkScalar scale) const
SkScalar dashPhase() const
static int KeySize(const GrStyle &, Apply, uint32_t flags=0)
const SkStrokeRec & strokeRec() const
@ kDefault_Cap
equivalent to kButt_Cap
static constexpr int kCapCount
static constexpr int kJoinCount
@ kDefault_Join
equivalent to kMiter_Join
@ kMiter_Join
extends to miter limit
@ kNone_DashType
ignores the info parameter
@ kDash_DashType
fills in all of the info parameter
bool filterPath(SkPath *dst, const SkPath &src, SkStrokeRec *, const SkRect *cullR) const
static constexpr int kStyleCount
bool applyToPath(SkPath *dst, const SkPath &src) const
SkScalar getWidth() const
SkPaint::Join getJoin() const
SkPaint::Cap getCap() const
void setResScale(SkScalar rs)
SkScalar getMiter() const
FlutterSemanticsFlag flags
bool InternalFilter(SkPath *dst, const SkPath &src, SkStrokeRec *rec, const SkRect *cullRect, const SkScalar aIntervals[], int32_t count, SkScalar initialDashLength, int32_t initialDashIndex, SkScalar intervalLength, SkScalar startPhase, StrokeRecApplication=StrokeRecApplication::kAllow)
void CalcDashParameters(SkScalar phase, const SkScalar intervals[], int32_t count, SkScalar *initialDashLength, int32_t *initialDashIndex, SkScalar *intervalLength, SkScalar *adjustedPhase=nullptr)