Lines Matching refs:V4f
16 using V4f = skvx::Vec<4, float>; typedef
40 static AI V4f next_diag(const V4f& v) { in next_diag()
47 static AI void correct_bad_edges(const M4f& bad, V4f* e1, V4f* e2, V4f* e3) { in correct_bad_edges()
59 static AI void correct_bad_coords(const M4f& bad, V4f* c1, V4f* c2, V4f* c3) { in correct_bad_coords()
241 const V4f& testX, const V4f& testY, in barycentric_coords()
242 V4f* u, V4f* v, V4f* w) { in barycentric_coords()
298 V4f v2x = (scaleX * testX) - x0; in barycentric_coords()
299 V4f v2y = (scaleY * testY) - y0; in barycentric_coords()
301 V4f dot02 = v0x * v2x + v0y * v2y; in barycentric_coords()
302 V4f dot12 = v1x * v2x + v1y * v2y; in barycentric_coords()
312 static M4f inside_triangle(const V4f& u, const V4f& v, const V4f& w) { in inside_triangle()
319 V4f xs = this->x4f(); in projectedBounds()
320 V4f ys = this->y4f(); in projectedBounds()
321 V4f ws = this->w4f(); in projectedBounds()
324 V4f x2d = xs / ws; in projectedBounds()
325 V4f y2d = ys / ws; in projectedBounds()
328 min(if_then_else(clipW, V4f(SK_ScalarInfinity), x2d)), in projectedBounds()
329 min(if_then_else(clipW, V4f(SK_ScalarInfinity), y2d)), in projectedBounds()
330 max(if_then_else(clipW, V4f(SK_ScalarNegativeInfinity), x2d)), in projectedBounds()
331 max(if_then_else(clipW, V4f(SK_ScalarNegativeInfinity), y2d)) in projectedBounds()
335 V4f t = (SkPathPriv::kW0PlaneDistance - ws) / (next_ccw(ws) - ws); in projectedBounds()
341 min(if_then_else(clipW, x2d, V4f(frontBounds.fLeft))), in projectedBounds()
342 min(if_then_else(clipW, y2d, V4f(frontBounds.fTop))), in projectedBounds()
343 max(if_then_else(clipW, x2d, V4f(frontBounds.fRight))), in projectedBounds()
344 max(if_then_else(clipW, y2d, V4f(frontBounds.fBottom))) in projectedBounds()
349 V4f x2d = xs * ws; in projectedBounds()
350 V4f y2d = ys * ws; in projectedBounds()
427 V4f t = (SkPathPriv::kW0PlaneDistance - v.fW) / (next_ccw(v.fW) - v.fW); in ClipToW0()
582 V4f devX = quad->fDevice.x4f(); in CropToRect()
583 V4f devY = quad->fDevice.y4f(); in CropToRect()
586 V4f devW = quad->fDevice.w4f(); in CropToRect()
596 V4f clipX = {cropRect.fLeft, cropRect.fLeft, cropRect.fRight, cropRect.fRight}; in CropToRect()
597 V4f clipY = {cropRect.fTop, cropRect.fBottom, cropRect.fTop, cropRect.fBottom}; in CropToRect()
601 V4f u1, v1, w1; in CropToRect()
602 V4f u2, v2, w2; in CropToRect()
652 V4f iw = 1.f / ws; in reset()
683 V4f dx = edgeVectors.fDX; in reset()
684 V4f dy = edgeVectors.fDY; in reset()
688 V4f c = dx*edgeVectors.fY2D - dy*edgeVectors.fX2D; in reset()
690 V4f test = dy * next_cw(edgeVectors.fX2D) + (-dx * next_cw(edgeVectors.fY2D) + c); in reset()
702 V4f TessellationHelper::EdgeEquations::estimateCoverage(const V4f& x2d, const V4f& y2d) const { in estimateCoverage()
704 V4f d0 = fA[0]*x2d + (fB[0]*y2d + fC[0]); in estimateCoverage()
705 V4f d1 = fA[1]*x2d + (fB[1]*y2d + fC[1]); in estimateCoverage()
706 V4f d2 = fA[2]*x2d + (fB[2]*y2d + fC[2]); in estimateCoverage()
707 V4f d3 = fA[3]*x2d + (fB[3]*y2d + fC[3]); in estimateCoverage()
716 V4f w = max(0.f, min(1.f, d0 + d3)); in estimateCoverage()
717 V4f h = max(0.f, min(1.f, d1 + d2)); in estimateCoverage()
721 int TessellationHelper::EdgeEquations::computeDegenerateQuad(const V4f& signedEdgeDistances, in computeDegenerateQuad()
722 V4f* x2d, V4f* y2d, in computeDegenerateQuad()
726 V4f d = (*x2d)*fA[i] + (*y2d)*fB[i] + fC[i]; in computeDegenerateQuad()
736 V4f oc = fC + signedEdgeDistances; in computeDegenerateQuad()
741 V4f denom = fA * next_cw(fB) - fB * next_cw(fA); in computeDegenerateQuad()
742 V4f px = (fB * next_cw(oc) - oc * next_cw(fB)) / denom; in computeDegenerateQuad()
743 V4f py = (oc * next_cw(fA) - fA * next_cw(oc)) / denom; in computeDegenerateQuad()
749 V4f dists1 = px * skvx::shuffle<3, 3, 0, 0>(fA) + in computeDegenerateQuad()
752 V4f dists2 = px * skvx::shuffle<1, 2, 1, 2>(fA) + in computeDegenerateQuad()
819 V4f avgX = 0.5f * (skvx::shuffle<0, 1, 0, 2>(px) + skvx::shuffle<2, 3, 1, 3>(px)); in computeDegenerateQuad()
820 V4f avgY = 0.5f * (skvx::shuffle<0, 1, 0, 2>(py) + skvx::shuffle<2, 3, 1, 3>(py)); in computeDegenerateQuad()
892 V4f halfTanTheta = -edgeVectors.fCosTheta * edgeVectors.fInvSinTheta; in reset()
893 V4f edgeAdjust = edgeDistances * (halfTanTheta + next_ccw(halfTanTheta)) + in reset()
899 V4f threshold = 0.1f - (1.f / edgeVectors.fInvLengths); in reset()
947 const V4f& signedEdgeDistances) { in moveAlong()
959 V4f signedOutsets = -edgeVectors.fInvSinTheta * next_cw(signedEdgeDistances); in moveAlong()
960 V4f signedOutsetsCW = edgeVectors.fInvSinTheta * signedEdgeDistances; in moveAlong()
969 V4f du = next_ccw(fU) - fU; in moveAlong()
970 V4f dv = next_ccw(fV) - fV; in moveAlong()
974 V4f dr = next_ccw(fR) - fR; in moveAlong()
980 void TessellationHelper::Vertices::moveTo(const V4f& x2d, const V4f& y2d, const M4f& mask) { in moveTo()
982 V4f e1x = skvx::shuffle<2, 3, 2, 3>(fX) - skvx::shuffle<0, 1, 0, 1>(fX); in moveTo()
983 V4f e1y = skvx::shuffle<2, 3, 2, 3>(fY) - skvx::shuffle<0, 1, 0, 1>(fY); in moveTo()
984 V4f e1w = skvx::shuffle<2, 3, 2, 3>(fW) - skvx::shuffle<0, 1, 0, 1>(fW); in moveTo()
989 V4f e2x = skvx::shuffle<1, 1, 3, 3>(fX) - skvx::shuffle<0, 0, 2, 2>(fX); in moveTo()
990 V4f e2y = skvx::shuffle<1, 1, 3, 3>(fY) - skvx::shuffle<0, 0, 2, 2>(fY); in moveTo()
991 V4f e2w = skvx::shuffle<1, 1, 3, 3>(fW) - skvx::shuffle<0, 0, 2, 2>(fW); in moveTo()
1000 V4f c1x = e1w * x2d - e1x; in moveTo()
1001 V4f c1y = e1w * y2d - e1y; in moveTo()
1002 V4f c2x = e2w * x2d - e2x; in moveTo()
1003 V4f c2y = e2w * y2d - e2y; in moveTo()
1004 V4f c3x = fW * x2d - fX; in moveTo()
1005 V4f c3y = fW * y2d - fY; in moveTo()
1008 V4f a, b, denom; in moveTo()
1032 V4f(1.f))); /* !A & !B */ in moveTo()
1038 V4f(0.f)) / denom; /* !A */ in moveTo()
1043 V4f(0.f)) / denom; /* !B */ in moveTo()
1056 V4f scale = if_then_else(fW < 0.f, V4f(-1.f), V4f(1.f)); in moveTo()
1066 V4f e1u = skvx::shuffle<2, 3, 2, 3>(fU) - skvx::shuffle<0, 1, 0, 1>(fU); in moveTo()
1067 V4f e1v = skvx::shuffle<2, 3, 2, 3>(fV) - skvx::shuffle<0, 1, 0, 1>(fV); in moveTo()
1068 V4f e1r = skvx::shuffle<2, 3, 2, 3>(fR) - skvx::shuffle<0, 1, 0, 1>(fR); in moveTo()
1071 V4f e2u = skvx::shuffle<1, 1, 3, 3>(fU) - skvx::shuffle<0, 0, 2, 2>(fU); in moveTo()
1072 V4f e2v = skvx::shuffle<1, 1, 3, 3>(fV) - skvx::shuffle<0, 0, 2, 2>(fV); in moveTo()
1073 V4f e2r = skvx::shuffle<1, 1, 3, 3>(fR) - skvx::shuffle<0, 0, 2, 2>(fR); in moveTo()
1105 V4f TessellationHelper::inset(const skvx::Vec<4, float>& edgeDistances, in inset()
1209 V4f halfLengths = -0.5f / next_cw(fEdgeVectors.fInvLengths); // Negate to inset in adjustDegenerateVertices()
1211 V4f safeInsets = if_then_else(crossedEdges, halfLengths, signedEdgeDistances); in adjustDegenerateVertices()
1219 V4f x2d = fEdgeVectors.fX2D; in adjustDegenerateVertices()
1220 V4f y2d = fEdgeVectors.fY2D; in adjustDegenerateVertices()