Lines Matching defs:quad
53 // Extracts lengths of vertical and horizontal edges of axis-aligned quad. "width" is the edge
55 SkSize axis_aligned_quad_size(const GrQuad& quad) {
56 SkASSERT(quad.quadType() == GrQuad::Type::kAxisAligned);
58 float dw = sk_float_abs(quad.x(2) - quad.x(0)) + sk_float_abs(quad.y(2) - quad.y(0));
59 float dh = sk_float_abs(quad.x(1) - quad.x(0)) + sk_float_abs(quad.y(1) - quad.y(0));
131 // so a sufficiently large rect is returned even if the quad ends up batched with an op that uses
139 // Either the quad has no subset constraint and is batched with a subset constrained op
172 // The src quad should not have any perspective
196 const DrawQuad& quad, const SkRect& subsetRect) {
197 // If both the device and local quad are both axis-aligned, and filtering is off, the local quad
201 SkRect localBounds = quad.fLocal.bounds();
204 quad.fDevice.quadType() == GrQuad::Type::kAxisAligned &&
205 quad.fLocal.quadType() == GrQuad::Type::kAxisAligned &&
211 // If the local quad is inset by at least 0.5 pixels into the subset rect's bounds, the
222 * Op that implements TextureOp::Make. It draws textured quads. Each quad can modulate against a
237 DrawQuad* quad,
241 filter, mm, color, saturate, aaType, quad, subset);
442 DrawQuad* quad,
451 GrQuadUtils::ResolveAAType(aaType, quad->fEdgeFlags, quad->fDevice,
452 &aaType, &quad->fEdgeFlags);
462 if (safe_to_ignore_subset_rect(aaType, filter, *quad, *subsetRect)) {
471 normalize_src_quad(params, &quad->fLocal);
476 bool hairline = GrQuadUtils::WillUseHairline(quad->fDevice, aaType, quad->fEdgeFlags);
477 this->setBounds(quad->fDevice.bounds(), HasAABloat(aaType == GrAAType::kCoverage),
479 int quadCount = this->appendQuad(quad, color, subset);
538 } // else another quad referencing the same proxy
547 DrawQuad quad;
549 quad.fDevice = GrQuad::MakeFromSkQuad(set[q].fDstClipQuad, ctm);
553 quad.fLocal = GrQuad::MakeFromSkQuad(srcPts, SkMatrix::I());
555 quad.fDevice = GrQuad::MakeFromRect(set[q].fDstRect, ctm);
556 quad.fLocal = GrQuad(set[q].fSrcRect);
559 // This may be reduced per-quad from the requested aggregate filtering level, and used
564 // found a quad that requires linear (so net is still nearest). Similar for mip
570 auto [mustFilter, mustMM] = filter_and_mm_have_effect(quad.fLocal, quad.fDevice);
583 // Determine the AA type for the quad, then merge with net AA type
585 GrQuadUtils::ResolveAAType(aaType, set[q].fAAFlags, quad.fDevice,
586 &aaForQuad, &quad.fEdgeFlags);
588 bounds.joinPossiblyEmptyRect(quad.fDevice.bounds());
589 hasSubpixel |= GrQuadUtils::WillUseHairline(quad.fDevice, aaForQuad, quad.fEdgeFlags);
603 if (!safe_to_ignore_subset_rect(aaForQuad, filterForQuad, quad, *subsetRect)) {
613 normalize_src_quad(proxyParams, &quad.fLocal);
619 // Always append a quad (or 2 if perspective clipped), it just may refer back to a prior
621 fViewCountPairs[p].fQuadCnt += this->appendQuad(&quad, set[q].fColor, subset);
636 int appendQuad(DrawQuad* quad, const SkPMColor4f& color, const SkRect& subset) {
639 int quadCount = GrQuadUtils::ClipToW0(quad, &extra);
643 quad->fEdgeFlags = GrQuadAAFlags::kNone;
646 fQuads.append(quad->fDevice, {color, subset, quad->fEdgeFlags}, &quad->fLocal);
748 // If quad counts per proxy were calculated correctly, the entire iterator
1050 // Concatenate quad lists together
1084 const GrQuad* quad = iter.deviceQuad();
1093 quad->point(0).fX, quad->point(0).fY, quad->point(1).fX, quad->point(1).fY,
1094 quad->point(2).fX, quad->point(2).fY, quad->point(3).fX, quad->point(3).fY,
1139 DrawQuad* quad,
1148 auto [mustFilter, mustMM] = filter_and_mm_have_effect(quad->fLocal, quad->fDevice);
1159 mm, color, saturate, aaType, std::move(quad), subset);
1171 if (quad->fLocal.asRect(&localRect)) {
1188 return FillRectOp::Make(context, std::move(paint), aaType, quad);
1192 // A helper class that assists in breaking up bulk API quad draws into manageable chunks.
1254 // Greedily clump quad draws together until the index buffer limit is exceeded.
1269 // Ensure that the index buffer limits are lower than the proxy and quad count limits of
1287 DrawQuad quad;
1288 quad.fEdgeFlags = set[i].fAAFlags;
1290 quad.fDevice = GrQuad::MakeFromSkQuad(set[i].fDstClipQuad, ctm);
1294 quad.fLocal = GrQuad::MakeFromSkQuad(srcPts, SkMatrix::I());
1296 quad.fDevice = GrQuad::MakeFromRect(set[i].fDstRect, ctm);
1297 quad.fLocal = GrQuad(set[i].fSrcRect);
1304 filter, mm, set[i].fColor, saturate, blendMode, aaType, &quad, subset);
1443 DrawQuad quad = {GrQuad::MakeFromRect(rect, viewMatrix), GrQuad(srcRect), aaFlags};
1446 SkBlendMode::kSrcOver, aaType, &quad,