Lines Matching refs:clip
329 void SurfaceDrawContext::drawGlyphRunListNoCache(const GrClip* clip,
340 GrSubRunNoCachePainter painter{this, alloc, clip, viewMatrix, glyphRunList, paint};
351 void SurfaceDrawContext::drawGlyphRunListWithCache(const GrClip* clip,
394 subRun.draw(clip, viewMatrix, glyphRunList, paint, this);
400 void SurfaceDrawContext::drawGlyphRunList(const GrClip* clip,
420 this->drawGlyphRunListNoCache(clip, viewMatrix, glyphRunList, paint);
422 this->drawGlyphRunListWithCache(clip, viewMatrix, glyphRunList, paint);
426 void SurfaceDrawContext::drawPaint(const GrClip* clip,
430 // drawFilledQuad() will automatically restrict it to clip bounds for us if possible.
435 this->fillRectToRect(clip, std::move(paint), GrAA::kNo, SkMatrix::I(), r, r);
443 this->fillPixelsWithLocalMatrix(clip, std::move(paint), bounds, localMatrix);
448 // The rect to draw doesn't intersect clip or render target, so no draw op should be added
454 // The clip was folded into the device quad, with updated edge flags and local coords, and
457 // No change to clip, but quad updated to better fit clip/render target, and caller is
463 const GrClip* clip, const GrUserStencilSettings* stencilSettings, GrAA* aa, DrawQuad* quad,
466 // 1. kDiscard applies when clip bounds and quad bounds do not intersect
468 // pixel aligned rect requires rect clip and (rect quad or quad covers clip) OR
469 // 2b. kSubmitted applies when constColor and rrect clip and quad covers clip
470 // 4. kClipApplied applies when rect clip and (rect quad or quad covers clip)
496 // Don't try to apply the clip early if we know rendering will use hairline methods, as this
511 GrClip::PreClipResult result = clip ? clip->preApply(drawBounds, *aa)
529 // The clip and draw state are too complicated to try and reduce
532 } // Else fall through to attempt to combine the draw and clip geometry together
538 // If we reached here, we know we're an axis-aligned clip that is either a rect or a round rect,
544 // Our fractional bounds aren't actually inside the clip. GrClip::preApply() can sometimes
555 // modify geometry and edge flags to represent intersected shape of clip and draw.
575 // else the draw and clip were combined so just update the AA to reflect combination
578 // The clip was anti-aliased and now the draw needs to be upgraded to AA to
579 // properly reflect the smooth edge of the clip.
585 // deviceQuad is exactly the intersection of original quad and clip, so it can be
586 // drawn with no clip (submitted by caller)
605 // The quads have been updated to better fit the clip bounds, but can't get rid of
606 // the clip entirely
611 void SurfaceDrawContext::drawFilledQuad(const GrClip* clip,
623 QuadOptimization opt = this->attemptQuadOptimization(clip, ss, &aa, quad, &paint);
626 const GrClip* finalClip = opt == QuadOptimization::kClipApplied ? nullptr : clip;
644 void SurfaceDrawContext::drawTexture(const GrClip* clip,
678 this->fillRectToRect(clip, std::move(paint), GrAA::kYes, viewMatrix, dstRect, srcRect);
686 this->drawTexturedQuad(clip, std::move(view), srcAlphaType, std::move(colorSpaceXform), filter,
690 void SurfaceDrawContext::drawTexturedQuad(const GrClip* clip,
711 QuadOptimization opt = this->attemptQuadOptimization(clip, nullptr/*stencil*/, &aa, quad,
717 const GrClip* finalClip = opt == QuadOptimization::kClipApplied ? nullptr : clip;
731 void SurfaceDrawContext::drawRect(const GrClip* clip,
753 this->fillRectToRect(clip, std::move(paint), aa, viewMatrix, rect, rect);
775 this->addDrawOp(clip, std::move(op));
780 this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix,
784 void SurfaceDrawContext::fillRectToRect(const GrClip* clip,
799 QuadOptimization opt = this->attemptQuadOptimization(clip, nullptr/*stencil*/, &aa, &quad,
807 const GrClip* optimizedClip = clip;
808 if (clip && viewMatrix.isScaleTranslate() && quad.fDevice.asRect(&croppedRect) &&
823 // in pre-matrix space, so use the original rect. Also preserve the original clip.
837 this->drawFilledQuad(clip, std::move(paint), aa, &quad);
840 void SurfaceDrawContext::drawQuadSet(const GrClip* clip,
848 FillRectOp::AddFillRectOps(this, clip, fContext, std::move(paint), aaType, viewMatrix,
914 bool SurfaceDrawContext::stencilPath(const GrHardClip* clip,
918 SkIRect clipBounds = clip ? clip->getConservativeBounds()
943 args.fClip = clip;
952 void SurfaceDrawContext::drawTextureSet(const GrClip* clip,
975 TextureOp::AddTextureSetOps(this, clip, fContext, set, cnt, proxyRunCnt, filter, mm, saturate,
979 void SurfaceDrawContext::drawVertices(const GrClip* clip,
1000 this->addDrawOp(clip, std::move(op));
1005 void SurfaceDrawContext::drawAtlas(const GrClip* clip,
1022 this->addDrawOp(clip, std::move(op));
1045 const GrClip* clip = origClip;
1046 // It is not uncommon to clip to a round rect and then draw that same round rect. Since our
1047 // lower level clip code works from op bounds, which are SkRects, it doesn't detect that the
1048 // clip can be ignored. The following test attempts to mitigate the stencil clip cost but only
1057 if (clip && stroke.getStyle() == SkStrokeRec::kFill_Style &&
1059 GrClip::PreClipResult result = clip->preApply(devRRect.getBounds(), aa);
1064 clip = nullptr;
1068 // got here, we know the devRRect's bounds aren't fully contained by the clip.
1071 // NOTE: On the android framework, we allow this optimization even when the clip
1074 clip = nullptr;
1111 this->addDrawOp(clip, std::move(op));
1116 this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix,
1122 bool SurfaceDrawContext::drawFastShadow(const GrClip* clip,
1214 this->addDrawOp(clip, std::move(op));
1319 this->addDrawOp(clip, std::move(op));
1328 void SurfaceDrawContext::drawRegion(const GrClip* clip,
1355 return this->drawPath(clip, std::move(paint), aa, viewMatrix, path, style);
1360 this->addDrawOp(clip, std::move(op));
1363 void SurfaceDrawContext::drawOval(const GrClip* clip,
1381 this->drawRect(clip, std::move(paint), aa, viewMatrix, oval, &style);
1417 this->addDrawOp(clip, std::move(op));
1422 this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix,
1427 void SurfaceDrawContext::drawArc(const GrClip* clip,
1456 this->addDrawOp(clip, std::move(op));
1461 this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix,
1466 void SurfaceDrawContext::drawImageLattice(const GrClip* clip,
1485 this->addDrawOp(clip, std::move(op));
1549 void SurfaceDrawContext::drawPath(const GrClip* clip,
1561 this->drawShape(clip, std::move(paint), aa, viewMatrix, std::move(shape));
1564 void SurfaceDrawContext::drawShape(const GrClip* clip,
1576 this->drawPaint(clip, std::move(paint), viewMatrix);
1584 this->drawShapeUsingPathRenderer(clip, std::move(paint), aa, viewMatrix, std::move(shape),
1588 static SkIRect get_clip_bounds(const SurfaceDrawContext* sdc, const GrClip* clip) {
1589 return clip ? clip->getConservativeBounds() : SkIRect::MakeWH(sdc->width(), sdc->height());
1592 bool SurfaceDrawContext::drawAndStencilPath(const GrHardClip* clip,
1607 this->stencilRect(clip, ss, std::move(paint), GrAA::kNo, SkMatrix::I(),
1621 SkIRect clipConservativeBounds = get_clip_bounds(this, clip);
1652 clip,
1674 void SurfaceDrawContext::drawStrokedLine(const GrClip* clip,
1718 this->fillQuadWithEdgeAA(clip, std::move(paint), aa, edgeAA, viewMatrix, corners, nullptr);
1721 bool SurfaceDrawContext::drawSimpleShape(const GrClip* clip,
1745 this->drawStrokedLine(clip, std::move(*paint), aa, viewMatrix, linePts,
1751 this->drawRect(clip, std::move(*paint), aa, viewMatrix, rrect.rect(),
1755 this->drawOval(clip, std::move(*paint), aa, viewMatrix, rrect.rect(),
1759 this->drawRRect(clip, std::move(*paint), aa, viewMatrix, rrect, shape.style());
1773 this->addDrawOp(clip, std::move(op));
1784 void SurfaceDrawContext::drawShapeUsingPathRenderer(const GrClip* clip,
1798 SkIRect clipConservativeBounds = get_clip_bounds(this, clip);
1840 if (this->drawSimpleShape(clip, &paint, aa, viewMatrix, shape)) {
1892 clip,
1901 void SurfaceDrawContext::addDrawOp(const GrClip* clip,
1913 // Setup clip
1919 if (clip) {
1920 // Have a complex clip, so defer to its early clip culling
1927 skipDraw = clip->apply(fContext, this, drawOp, aaType,
1930 // No clipping, so just clip the bounds against the logical render target dimensions