Lines Matching defs:args
88 const CanDrawPathArgs& args) const {
89 const GrStyledShape& shape = *args.fShape;
90 if (args.fAAType == GrAAType::kCoverage ||
92 args.fViewMatrix->hasPerspective() ||
94 !args.fProxy->canUseStencil(*args.fCaps)) {
102 if (args.fHasUserStencilSettings) {
112 bool TessellationPathRenderer::onDrawPath(const DrawPathArgs& args) {
113 auto sdc = args.fSurfaceDrawContext;
116 args.fShape->asPath(&path);
118 const SkRect pathDevBounds = args.fViewMatrix->mapRect(args.fShape->bounds());
126 SkRect viewport = SkRect::Make(*args.fClipConservativeBounds);
127 if (!args.fShape->style().isSimpleFill()) {
129 const SkStrokeRec& stroke = args.fShape->style().strokeRec();
138 inflationRadius = stroke.getInflationRadius() * args.fViewMatrix->getMaxScale();
142 path = PreChopPathCurves(path, *args.fViewMatrix, viewport);
146 if (!args.fShape->style().isSimpleFill()) {
148 SkASSERT(args.fUserStencilSettings->isUnused());
149 const SkStrokeRec& stroke = args.fShape->style().strokeRec();
151 auto op = GrOp::Make<StrokeTessellateOp>(args.fContext, args.fAAType, *args.fViewMatrix,
152 path, stroke, std::move(args.fPaint));
153 sdc->addDrawOp(args.fClip, std::move(op));
160 args.fSurfaceDrawContext->drawPaint(args.fClip, std::move(args.fPaint),
161 *args.fViewMatrix);
167 if (args.fShape->knownToBeConvex() && !path.isInverseFillType()) {
168 auto op = GrOp::Make<PathTessellateOp>(args.fContext,
169 args.fSurfaceDrawContext->arenaAlloc(),
170 args.fAAType,
171 args.fUserStencilSettings,
172 *args.fViewMatrix,
174 std::move(args.fPaint),
176 sdc->addDrawOp(args.fClip, std::move(op));
180 SkASSERT(args.fUserStencilSettings->isUnused()); // See onGetStencilSupport().
182 ? args.fSurfaceDrawContext->asSurfaceProxy()->backingStoreBoundsRect()
184 auto op = make_non_convex_fill_op(args.fContext,
185 args.fSurfaceDrawContext->arenaAlloc(),
187 args.fAAType,
189 *args.fViewMatrix,
191 std::move(args.fPaint));
192 sdc->addDrawOp(args.fClip, std::move(op));
196 void TessellationPathRenderer::onStencilPath(const StencilPathArgs& args) {
197 SkASSERT(args.fShape->style().isSimpleFill()); // See onGetStencilSupport().
198 SkASSERT(!args.fShape->inverseFilled()); // See onGetStencilSupport().
200 auto sdc = args.fSurfaceDrawContext;
201 GrAAType aaType = (GrAA::kYes == args.fDoStencilMSAA) ? GrAAType::kMSAA : GrAAType::kNone;
204 args.fViewMatrix->mapRect(&pathDevBounds, args.fShape->bounds());
207 args.fShape->asPath(&path);
213 SkRect viewport = SkRect::Make(*args.fClipConservativeBounds);
214 path = PreChopPathCurves(path, *args.fViewMatrix, viewport);
217 if (args.fShape->knownToBeConvex()) {
229 auto op = GrOp::Make<PathTessellateOp>(args.fContext,
230 args.fSurfaceDrawContext->arenaAlloc(),
233 *args.fViewMatrix,
237 sdc->addDrawOp(args.fClip, std::move(op));
241 auto op = make_non_convex_fill_op(args.fContext,
242 args.fSurfaceDrawContext->arenaAlloc(),
246 *args.fViewMatrix,
249 sdc->addDrawOp(args.fClip, std::move(op));