Lines Matching refs:phase
16 static SkScalar find_first_interval(const SkScalar intervals[], SkScalar phase, in find_first_interval() argument
19 if (phase > intervals[i]) { in find_first_interval()
20 phase -= intervals[i]; in find_first_interval()
23 return intervals[i] - phase; in find_first_interval()
34 void SkDashPath::CalcDashParameters(SkScalar phase, const SkScalar intervals[], int32_t count, in CalcDashParameters() argument
44 if ((len > 0) && SkScalarIsFinite(phase) && SkScalarIsFinite(len)) { in CalcDashParameters()
49 if (phase < 0) { in CalcDashParameters()
50 phase = -phase; in CalcDashParameters()
51 if (phase > len) { in CalcDashParameters()
52 phase = SkScalarMod(phase, len); in CalcDashParameters()
54 phase = len - phase; in CalcDashParameters()
59 SkASSERT(phase <= len); in CalcDashParameters()
60 if (phase == len) { in CalcDashParameters()
61 phase = 0; in CalcDashParameters()
63 } else if (phase >= len) { in CalcDashParameters()
64 phase = SkScalarMod(phase, len); in CalcDashParameters()
66 *adjustedPhase = phase; in CalcDashParameters()
68 SkASSERT(phase >= 0 && phase < len); in CalcDashParameters()
70 *initialDashLength = find_first_interval(intervals, phase, in CalcDashParameters()