Lines Matching refs:p2
28 void PatchWriter::chopAndWriteQuads(float2 p0, float2 p1, float2 p2, int numPatches) {
36 float4 bc = mix(p1.xyxy(), p2.xyxy(), T);
38 // p1 & p2 of the cubic representation of the middle quad.
54 float2 bc = (p1 + p2) * .5f;
59 TrianglePatch(*this) << p0 << abc << p2;
61 CubicPatch(*this) << QuadToCubic{abc, bc, p2}; // Write the 2nd quad.
64 CubicPatch(*this) << QuadToCubic{p0, p1, p2}; // Write the single quad.
67 *this << innerTriangulator.pushVertex(to_skpoint(p2));
72 void PatchWriter::chopAndWriteConics(float2 p0, float2 p1, float2 p2, float w, int numPatches) {
79 float4 h2 = float4(p2,1,1);
110 void PatchWriter::chopAndWriteCubics(float2 p0, float2 p1, float2 p2, float2 p3, int numPatches) {
118 float4 bc = mix(p1.xyxy(), p2.xyxy(), T);
119 float4 cd = mix(p2.xyxy(), p3.xyxy(), T);
123 float4 middle = mix(abc, bcd, T.zwxy()); // p1 & p2 of the middle cubic.
133 std::tie(p0, p1, p2) = {abcd.hi, bcd.hi, cd.hi}; // Save the 3rd cubic.
138 float2 bc = (p1 + p2) * .5f;
139 float2 cd = (p2 + p3) * .5f;
151 CubicPatch(*this) << p0 << p1 << p2 << p3; // Write the single cubic.