static void test_path(GrContext* ctx,
                      GrRenderTargetContext* renderTargetContext,
                      const SkPath& path,
                      const SkMatrix& matrix = SkMatrix::I(),
                      GrAAType aaType = GrAAType::kNone,
                      std::unique_ptr<GrFragmentProcessor> fp = nullptr) {
    GrTessellatingPathRenderer tess;

    GrPaint paint;
    paint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
    if (fp) {
        paint.addColorFragmentProcessor(std::move(fp));
    }

    GrNoClip noClip;
    SkIRect clipConservativeBounds = SkIRect::MakeWH(renderTargetContext->width(),
                                                     renderTargetContext->height());
    GrStyle style(SkStrokeRec::kFill_InitStyle);
    GrShape shape(path, style);
    GrPathRenderer::DrawPathArgs args{ctx,
                                      std::move(paint),
                                      &GrUserStencilSettings::kUnused,
                                      renderTargetContext,
                                      &noClip,
                                      &clipConservativeBounds,
                                      &matrix,
                                      &shape,
                                      aaType,
                                      false};
    tess.drawPath(args);
}
static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, GrResourceProvider* rp,
                      const SkPath& path) {
    GrTessellatingPathRenderer tess;
    GrPipelineBuilder pipelineBuilder;
    pipelineBuilder.setRenderTarget(rt);
    GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
    GrPathRenderer::DrawPathArgs args;
    args.fTarget = dt;
    args.fPipelineBuilder = &pipelineBuilder;
    args.fResourceProvider = rp;
    args.fColor = GrColor_WHITE;
    args.fViewMatrix = &SkMatrix::I();
    args.fPath = &path;
    args.fStroke = &stroke;
    args.fAntiAlias = false;
    tess.drawPath(args);
}
static void test_path(GrDrawTarget* dt, GrDrawContext* drawContext,
                      GrResourceProvider* rp, const SkPath& path) {
    GrTessellatingPathRenderer tess;
    GrPipelineBuilder pipelineBuilder;
    pipelineBuilder.setXPFactory(
        GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref();
    pipelineBuilder.setRenderTarget(drawContext->accessRenderTarget());
    GrNoClip noClip;
    GrStyle style(SkStrokeRec::kFill_InitStyle);
    GrPathRenderer::DrawPathArgs args;
    args.fTarget = dt;
    args.fPipelineBuilder = &pipelineBuilder;
    args.fClip = &noClip;
    args.fResourceProvider = rp;
    args.fColor = GrColor_WHITE;
    args.fViewMatrix = &SkMatrix::I();
    args.fPath = &path;
    args.fStyle = &style;
    args.fAntiAlias = false;
    tess.drawPath(args);
}