Lines Matching refs:SkScalar
13 SkScalar GrPathUtils::scaleToleranceToSrc(SkScalar devTol, in scaleToleranceToSrc()
18 SkScalar stretch = viewM.getMaxScale(); in scaleToleranceToSrc()
19 SkScalar srcTol = devTol; in scaleToleranceToSrc()
36 static const SkScalar gMinCurveTol = 0.0001f;
39 SkScalar tol) { in quadraticPointCount()
45 SkScalar d = points[1].distanceToLineSegmentBetween(points[0], points[2]); in quadraticPointCount()
53 SkScalar divSqrt = SkScalarSqrt(d / tol); in quadraticPointCount()
54 if (((SkScalar)SK_MaxS32) <= divSqrt) { in quadraticPointCount()
73 SkScalar tolSqd, in generateQuadraticPoints()
96 SkScalar tol) { in cubicPointCount()
102 SkScalar d = SkTMax( in cubicPointCount()
109 SkScalar divSqrt = SkScalarSqrt(d / tol); in cubicPointCount()
110 if (((SkScalar)SK_MaxS32) <= divSqrt) { in cubicPointCount()
130 SkScalar tolSqd, in generateCubicPoints()
157 SkScalar tol) { in worstCasePointCount()
179 SkScalar weight = iter.conicWeight(); in worstCasePointCount()
231 SkScalar maxD = qPts[0].distanceToSqd(qPts[1]); in set()
233 SkScalar d = qPts[1].distanceToSqd(qPts[2]); in set()
298 SkDEBUGCODE(static const SkScalar gTOL = 1.f / 100.f); in set()
328 void GrPathUtils::getConicKLM(const SkPoint p[3], const SkScalar weight, SkScalar klm[9]) { in getConicKLM()
329 const SkScalar w2 = 2.f * weight; in getConicKLM()
343 SkScalar scale = 0.f; in getConicKLM()
371 SkScalar apXab = ap.cross(ab); in is_point_within_cubic_tangents()
384 SkScalar dpXdc = dp.cross(dc); in is_point_within_cubic_tangents()
399 SkScalar toleranceSqd, in convert_noninflect_cubic_to_quads()
437 SkScalar invDALengthSqd = da.lengthSqd(); in convert_noninflect_cubic_to_quads()
442 SkScalar detABSqd = ab.cross(da); in convert_noninflect_cubic_to_quads()
444 SkScalar detDCSqd = dc.cross(da); in convert_noninflect_cubic_to_quads()
477 static const SkScalar kLengthScale = 3 * SK_Scalar1 / 2; in convert_noninflect_cubic_to_quads()
489 SkScalar dSqd = sublevel > kMaxSubdivs ? 0 : c0.distanceToSqd(c1); in convert_noninflect_cubic_to_quads()
501 SkScalar z0 = -ab.dot(p[0]); in convert_noninflect_cubic_to_quads()
503 SkScalar z1 = -dc.dot(p[3]); in convert_noninflect_cubic_to_quads()
506 SkScalar z = SkScalarMul(ab.fX, dc.fY) - SkScalarMul(ab.fY, dc.fX); in convert_noninflect_cubic_to_quads()
511 SkScalar d0Sqd = c0.distanceToSqd(cAvg); in convert_noninflect_cubic_to_quads()
512 SkScalar d1Sqd = c1.distanceToSqd(cAvg); in convert_noninflect_cubic_to_quads()
517 SkScalar d0d1 = SkScalarSqrt(SkScalarMul(d0Sqd, d1Sqd)); in convert_noninflect_cubic_to_quads()
547 SkScalar tolScale, in convertCubicToQuads()
552 const SkScalar tolSqd = SkScalarSquare(tolScale); in convertCubicToQuads()
563 SkScalar tolScale, in convertCubicToQuadsConstrainToTangents()
569 const SkScalar tolSqd = SkScalarSquare(tolScale); in convertCubicToQuadsConstrainToTangents()
585 static void calc_cubic_klm(const SkPoint p[4], const SkScalar controlK[4], in calc_cubic_klm()
586 const SkScalar controlL[4], const SkScalar controlM[4], in calc_cubic_klm()
587 SkScalar k[3], SkScalar l[3], SkScalar m[3]) { in calc_cubic_klm()
601 static void set_serp_klm(const SkScalar d[3], SkScalar k[4], SkScalar l[4], SkScalar m[4]) { in set_serp_klm()
602 SkScalar tempSqrt = SkScalarSqrt(9.f * d[1] * d[1] - 12.f * d[0] * d[2]); in set_serp_klm()
603 SkScalar ls = 3.f * d[1] - tempSqrt; in set_serp_klm()
604 SkScalar lt = 6.f * d[0]; in set_serp_klm()
605 SkScalar ms = 3.f * d[1] + tempSqrt; in set_serp_klm()
606 SkScalar mt = 6.f * d[0]; in set_serp_klm()
614 const SkScalar lt_ls = lt - ls; in set_serp_klm()
620 const SkScalar mt_ms = mt - ms; in set_serp_klm()
636 static void set_loop_klm(const SkScalar d[3], SkScalar k[4], SkScalar l[4], SkScalar m[4]) { in set_loop_klm()
637 SkScalar tempSqrt = SkScalarSqrt(4.f * d[0] * d[2] - 3.f * d[1] * d[1]); in set_loop_klm()
638 SkScalar ls = d[1] - tempSqrt; in set_loop_klm()
639 SkScalar lt = 2.f * d[0]; in set_loop_klm()
640 SkScalar ms = d[1] + tempSqrt; in set_loop_klm()
641 SkScalar mt = 2.f * d[0]; in set_loop_klm()
670 static void set_cusp_klm(const SkScalar d[3], SkScalar k[4], SkScalar l[4], SkScalar m[4]) { in set_cusp_klm()
671 const SkScalar ls = d[2]; in set_cusp_klm()
672 const SkScalar lt = 3.f * d[1]; in set_cusp_klm()
680 const SkScalar ls_lt = ls - lt; in set_cusp_klm()
697 static void set_quadratic_klm(const SkScalar d[3], SkScalar k[4], SkScalar l[4], SkScalar m[4]) { in set_quadratic_klm()
723 int GrPathUtils::chopCubicAtLoopIntersection(const SkPoint src[4], SkPoint dst[10], SkScalar klm[9], in chopCubicAtLoopIntersection()
724 SkScalar klm_rev[3]) { in chopCubicAtLoopIntersection()
726 SkScalar smallS = 0.f; in chopCubicAtLoopIntersection()
727 SkScalar largeS = 0.f; in chopCubicAtLoopIntersection()
729 SkScalar d[3]; in chopCubicAtLoopIntersection()
734 SkScalar tempSqrt = SkScalarSqrt(4.f * d[0] * d[2] - 3.f * d[1] * d[1]); in chopCubicAtLoopIntersection()
735 SkScalar ls = d[1] - tempSqrt; in chopCubicAtLoopIntersection()
736 SkScalar lt = 2.f * d[0]; in chopCubicAtLoopIntersection()
737 SkScalar ms = d[1] + tempSqrt; in chopCubicAtLoopIntersection()
738 SkScalar mt = 2.f * d[0]; in chopCubicAtLoopIntersection()
750 SkScalar chop_ts[2]; in chopCubicAtLoopIntersection()
788 SkScalar controlK[4]; in chopCubicAtLoopIntersection()
789 SkScalar controlL[4]; in chopCubicAtLoopIntersection()
790 SkScalar controlM[4]; in chopCubicAtLoopIntersection()
808 void GrPathUtils::getCubicKLM(const SkPoint p[4], SkScalar klm[9]) { in getCubicKLM()
809 SkScalar d[3]; in getCubicKLM()
812 SkScalar controlK[4]; in getCubicKLM()
813 SkScalar controlL[4]; in getCubicKLM()
814 SkScalar controlM[4]; in getCubicKLM()