Lines Matching refs:quad
158 static AI void outset_vertices(const Sk4f& outset, const QuadMetadata& metadata, Vertices* quad) { in outset_vertices() argument
164 quad->fX += fma(maskedOutsetCW, nextCW(metadata.fDX), maskedOutset * metadata.fDX); in outset_vertices()
165 quad->fY += fma(maskedOutsetCW, nextCW(metadata.fDY), maskedOutset * metadata.fDY); in outset_vertices()
166 if (quad->fUVRCount > 0) { in outset_vertices()
170 Sk4f du = nextCCW(quad->fU) - quad->fU; in outset_vertices()
171 Sk4f dv = nextCCW(quad->fV) - quad->fV; in outset_vertices()
172 quad->fU += fma(maskedOutsetCW, nextCW(du), maskedOutset * du); in outset_vertices()
173 quad->fV += fma(maskedOutsetCW, nextCW(dv), maskedOutset * dv); in outset_vertices()
174 if (quad->fUVRCount == 3) { in outset_vertices()
175 Sk4f dr = nextCCW(quad->fR) - quad->fR; in outset_vertices()
176 quad->fR += fma(maskedOutsetCW, nextCW(dr), maskedOutset * dr); in outset_vertices()
184 GrQuadAAFlags aaFlags, Vertices* quad) { in outset_projected_vertices() argument
186 Sk4f e1x = SkNx_shuffle<2, 3, 2, 3>(quad->fX) - SkNx_shuffle<0, 1, 0, 1>(quad->fX); in outset_projected_vertices()
187 Sk4f e1y = SkNx_shuffle<2, 3, 2, 3>(quad->fY) - SkNx_shuffle<0, 1, 0, 1>(quad->fY); in outset_projected_vertices()
188 Sk4f e1w = SkNx_shuffle<2, 3, 2, 3>(quad->fW) - SkNx_shuffle<0, 1, 0, 1>(quad->fW); in outset_projected_vertices()
192 Sk4f e2x = SkNx_shuffle<1, 1, 3, 3>(quad->fX) - SkNx_shuffle<0, 0, 2, 2>(quad->fX); in outset_projected_vertices()
193 Sk4f e2y = SkNx_shuffle<1, 1, 3, 3>(quad->fY) - SkNx_shuffle<0, 0, 2, 2>(quad->fY); in outset_projected_vertices()
194 Sk4f e2w = SkNx_shuffle<1, 1, 3, 3>(quad->fW) - SkNx_shuffle<0, 0, 2, 2>(quad->fW); in outset_projected_vertices()
206 Sk4f c3x = quad->fW * x2d - quad->fX; in outset_projected_vertices()
207 Sk4f c3y = quad->fW * y2d - quad->fY; in outset_projected_vertices()
249 quad->fX += a * e1x + b * e2x; in outset_projected_vertices()
250 quad->fY += a * e1y + b * e2y; in outset_projected_vertices()
251 quad->fW += a * e1w + b * e2w; in outset_projected_vertices()
252 correct_bad_coords(denom.abs() < kTolerance, &quad->fX, &quad->fY, &quad->fW); in outset_projected_vertices()
254 if (quad->fUVRCount > 0) { in outset_projected_vertices()
256 Sk4f e1u = SkNx_shuffle<2, 3, 2, 3>(quad->fU) - SkNx_shuffle<0, 1, 0, 1>(quad->fU); in outset_projected_vertices()
257 Sk4f e1v = SkNx_shuffle<2, 3, 2, 3>(quad->fV) - SkNx_shuffle<0, 1, 0, 1>(quad->fV); in outset_projected_vertices()
258 Sk4f e1r = SkNx_shuffle<2, 3, 2, 3>(quad->fR) - SkNx_shuffle<0, 1, 0, 1>(quad->fR); in outset_projected_vertices()
261 Sk4f e2u = SkNx_shuffle<1, 1, 3, 3>(quad->fU) - SkNx_shuffle<0, 0, 2, 2>(quad->fU); in outset_projected_vertices()
262 Sk4f e2v = SkNx_shuffle<1, 1, 3, 3>(quad->fV) - SkNx_shuffle<0, 0, 2, 2>(quad->fV); in outset_projected_vertices()
263 Sk4f e2r = SkNx_shuffle<1, 1, 3, 3>(quad->fR) - SkNx_shuffle<0, 0, 2, 2>(quad->fR); in outset_projected_vertices()
266 quad->fU += a * e1u + b * e2u; in outset_projected_vertices()
267 quad->fV += a * e1v + b * e2v; in outset_projected_vertices()
268 if (quad->fUVRCount == 3) { in outset_projected_vertices()
269 quad->fR += a * e1r + b * e2r; in outset_projected_vertices()
270 correct_bad_coords(denom.abs() < kTolerance, &quad->fU, &quad->fV, &quad->fR); in outset_projected_vertices()
272 correct_bad_coords(denom.abs() < kTolerance, &quad->fU, &quad->fV, nullptr); in outset_projected_vertices()
280 static float get_exact_coverage(const SkPoint& pixelCenter, const Vertices& quad, in get_exact_coverage() argument
305 Sk4i leftValid = SkNx_cast<int32_t>(quad.fX >= left); in get_exact_coverage()
306 Sk4i rightValid = SkNx_cast<int32_t>(quad.fX <= right); in get_exact_coverage()
307 Sk4i topValid = SkNx_cast<int32_t>(quad.fY >= top); in get_exact_coverage()
308 Sk4i botValid = SkNx_cast<int32_t>(quad.fY <= bot); in get_exact_coverage()
428 accumulate({quad.fX[ni], quad.fY[ni]}); in get_exact_coverage()
456 bool outset, Vertices* quad) { in compute_degenerate_quad() argument
500 SkPoint center = {0.25f * (quad->fX[0] + quad->fX[1] + quad->fX[2] + quad->fX[3]), in compute_degenerate_quad()
501 0.25f * (quad->fY[0] + quad->fY[1] + quad->fY[2] + quad->fY[3])}; in compute_degenerate_quad()
502 coverage = get_exact_coverage(center, *quad, edges); in compute_degenerate_quad()
512 float mc02 = get_exact_coverage({px[0], py[0]}, *quad, edges); in compute_degenerate_quad()
513 float mc13 = get_exact_coverage({px[1], py[1]}, *quad, edges); in compute_degenerate_quad()
519 float mc01 = get_exact_coverage({px[0], py[0]}, *quad, edges); in compute_degenerate_quad()
520 float mc23 = get_exact_coverage({px[2], py[2]}, *quad, edges); in compute_degenerate_quad()
545 outset_projected_vertices(px, py, aaFlags, quad); in compute_degenerate_quad()
628 const Vertices& quad) { in write_quad() argument
634 vb->write(quad.fX[i], quad.fY[i], in write_quad()
635 If(spec.deviceQuadType() == GrQuadType::kPerspective, quad.fW[i]), in write_quad()
647 vb->write(quad.fU[i], quad.fV[i], in write_quad()
648 If(spec.localQuadType() == GrQuadType::kPerspective, quad.fR[i])); in write_quad()