Lines Matching refs:Sk2s

13 static Sk2s from_point(const SkPoint& point) {
14 return Sk2s::Load(&point.fX);
17 static SkPoint to_point(const Sk2s& x) {
24 static SkVector to_vector(const Sk2s& x) { in to_vector()
113 static Sk2s quad_poly_eval(const Sk2s& A, const Sk2s& B, const Sk2s& C, const Sk2s& t) { in quad_poly_eval()
141 Sk2s p0 = from_point(pts[0]); in SkQuadToCoeff()
142 Sk2s p1 = from_point(pts[1]); in SkQuadToCoeff()
143 Sk2s p2 = from_point(pts[2]); in SkQuadToCoeff()
145 Sk2s p1minus2 = p1 - p0; in SkQuadToCoeff()
169 const Sk2s t2(t); in SkEvalQuadAt()
171 Sk2s P0 = from_point(src[0]); in SkEvalQuadAt()
172 Sk2s P1 = from_point(src[1]); in SkEvalQuadAt()
173 Sk2s P2 = from_point(src[2]); in SkEvalQuadAt()
175 Sk2s B = P1 - P0; in SkEvalQuadAt()
176 Sk2s A = P2 - P1 - B; in SkEvalQuadAt()
185 Sk2s P0 = from_point(src[0]); in SkEvalQuadTangentAt()
186 Sk2s P1 = from_point(src[1]); in SkEvalQuadTangentAt()
187 Sk2s P2 = from_point(src[2]); in SkEvalQuadTangentAt()
189 Sk2s B = P1 - P0; in SkEvalQuadTangentAt()
190 Sk2s A = P2 - P1 - B; in SkEvalQuadTangentAt()
191 Sk2s T = A * Sk2s(t) + B; in SkEvalQuadTangentAt()
196 static inline Sk2s interp(const Sk2s& v0, const Sk2s& v1, const Sk2s& t) { in interp()
203 Sk2s p0 = from_point(src[0]); in SkChopQuadAt()
204 Sk2s p1 = from_point(src[1]); in SkChopQuadAt()
205 Sk2s p2 = from_point(src[2]); in SkChopQuadAt()
206 Sk2s tt(t); in SkChopQuadAt()
208 Sk2s p01 = interp(p0, p1, tt); in SkChopQuadAt()
209 Sk2s p12 = interp(p1, p2, tt); in SkChopQuadAt()
329 Sk2s scale(SkDoubleToScalar(2.0 / 3.0)); in SkConvertQuadToCubic()
330 Sk2s s0 = from_point(src[0]); in SkConvertQuadToCubic()
331 Sk2s s1 = from_point(src[1]); in SkConvertQuadToCubic()
332 Sk2s s2 = from_point(src[2]); in SkConvertQuadToCubic()
429 Sk2s p0 = from_point(src[0]); in SkChopCubicAt()
430 Sk2s p1 = from_point(src[1]); in SkChopCubicAt()
431 Sk2s p2 = from_point(src[2]); in SkChopCubicAt()
432 Sk2s p3 = from_point(src[3]); in SkChopCubicAt()
433 Sk2s tt(t); in SkChopCubicAt()
435 Sk2s ab = interp(p0, p1, tt); in SkChopCubicAt()
436 Sk2s bc = interp(p1, p2, tt); in SkChopCubicAt()
437 Sk2s cd = interp(p2, p3, tt); in SkChopCubicAt()
438 Sk2s abc = interp(ab, bc, tt); in SkChopCubicAt()
439 Sk2s bcd = interp(bc, cd, tt); in SkChopCubicAt()
440 Sk2s abcd = interp(abc, bcd, tt); in SkChopCubicAt()
452 Sk2s p0 = from_point(pts[0]); in SkCubicToCoeff()
453 Sk2s p1 = from_point(pts[1]); in SkCubicToCoeff()
454 Sk2s p2 = from_point(pts[2]); in SkCubicToCoeff()
455 Sk2s p3 = from_point(pts[3]); in SkCubicToCoeff()
457 const Sk2s three(3); in SkCubicToCoeff()
458 Sk2s p1minusp2 = p1 - p2; in SkCubicToCoeff()
460 Sk2s D = p0; in SkCubicToCoeff()
461 Sk2s A = p3 + three * p1minusp2 - D; in SkCubicToCoeff()
462 Sk2s B = three * (D - p1minusp2 - p1); in SkCubicToCoeff()
463 Sk2s C = three * (p1 - D); in SkCubicToCoeff()
1268 static Sk2s times_2(const Sk2s& value) { in times_2()
1273 Sk2s p0 = from_point(fPts[0]); in evalAt()
1274 Sk2s p1 = from_point(fPts[1]); in evalAt()
1275 Sk2s p2 = from_point(fPts[2]); in evalAt()
1276 Sk2s tt(t); in evalAt()
1277 Sk2s ww(fW); in evalAt()
1278 Sk2s one(1); in evalAt()
1280 Sk2s p1w = p1 * ww; in evalAt()
1281 Sk2s C = p0; in evalAt()
1282 Sk2s A = p2 - times_2(p1w) + p0; in evalAt()
1283 Sk2s B = times_2(p1w - C); in evalAt()
1284 Sk2s numer = quad_poly_eval(A, B, C, tt); in evalAt()
1288 Sk2s denom = quad_poly_eval(A, B, one, tt); in evalAt()
1294 Sk2s p0 = from_point(fPts[0]); in evalTangentAt()
1295 Sk2s p1 = from_point(fPts[1]); in evalTangentAt()
1296 Sk2s p2 = from_point(fPts[2]); in evalTangentAt()
1297 Sk2s ww(fW); in evalTangentAt()
1299 Sk2s p20 = p2 - p0; in evalTangentAt()
1300 Sk2s p10 = p1 - p0; in evalTangentAt()
1302 Sk2s C = ww * p10; in evalTangentAt()
1303 Sk2s A = ww * p20 - p20; in evalTangentAt()
1304 Sk2s B = p20 - C - C; in evalTangentAt()
1306 return to_vector(quad_poly_eval(A, B, C, Sk2s(t))); in evalTangentAt()
1313 static Sk2s twice(const Sk2s& value) { in twice()
1318 Sk2s scale = Sk2s(SkScalarInvert(SK_Scalar1 + fW)); in chop()
1321 Sk2s p0 = from_point(fPts[0]); in chop()
1322 Sk2s p1 = from_point(fPts[1]); in chop()
1323 Sk2s p2 = from_point(fPts[2]); in chop()
1324 Sk2s ww(fW); in chop()
1326 Sk2s wp1 = ww * p1; in chop()
1327 Sk2s m = (p0 + twice(wp1) + p2) * scale * Sk2s(0.5f); in chop()