Lines Matching defs:stops
198 // If the stops are uniform, treat them as implicit.
238 // the stop. Assume that the distance between stops is 1/gapCount.
258 // for any t between stops n and n+1, the color we want is B[n] + F[n]*t.
307 // We clamp only when the stops are evenly spaced.
308 // If not, there may be hard stops, and clamping ruins hard stops at 0 and/or 1.
327 // The two-stop case with stops at 0 and 1.
344 // at -inf. Therefore, the max number of stops is fColorCount+1.
352 // Handle evenly distributed stops.
368 // Handle arbitrary stops.
372 // Remove the default stops inserted by SkGradientShaderBase::SkGradientShaderBase
442 // don't explicitly clamp t to [0,1]. That clamp would break hard stops
480 // any t between stops i and i+1, the color we want is mad(t, f[i], b[i]).
491 // With 2 stops, we upload the single FB as uniforms and interpolate directly with t.
506 // may need up to fColorCount+1 FBs and fColorCount t stops between them:
509 // stops: (-inf) t0 t1 t2 ...
511 // Both these arrays could end up shorter if any hard stops share the same t.
513 std::vector<float> stops; // TODO: SkSTArray?
514 stops.reserve(fColorCount);
520 // N.B. No stops[] entry for this implicit -inf.
522 // Now the non-edge cases, calculating scale and bias between adjacent normal stops.
532 stops.push_back(t_lo);
533 fb[stops.size()] = {f,b};
540 stops.push_back(t_lo);
541 fb[stops.size()] = { 0.0f, color_lo };
546 // Find the two stops we need to interpolate.
549 // Evenly spaced stops... we can calculate ix directly.
551 ix = trunc(clamp01(t) * uniformF(stops.size() - 1) + 1.0f);
554 // TODO: good place to experiment with a loop in skvm.... stops.size() can be huge.
556 for (float stop : stops) {
561 // TODO: we could skip any of the default stops GradientShaderBase's ctor added
563 // them for correctness, and it'd be up to two fewer stops to check.
564 // N.B. we do still need those stops for the fOrigPos == nullptr direct math path.
706 // when pos == null, there are colorCount uniformly distributed stops, going from 0 to 1,