99 const std::function<
SkPath(
void)>& createPath,
107 dContext->setResourceCacheLimit(8000000);
118 skgpu::Mipmapped::kNo,
126 SkPath path = createPath();
132 draw_path(dContext.
get(), sdc.get(), path, pathRenderer.
get(), aaType, style);
133 dContext->flushAndSubmit();
137 cache->purgeAsNeeded();
143 cache->purgeAsNeeded();
146 if (!checkListeners) {
153 for (
int i = 0; i < 20; ++i) {
154 float scaleX = 1 + ((float)i + 1)/20.f;
155 draw_path(dContext.
get(), sdc.get(), path, pathRenderer.
get(), aaType, style, scaleX);
157 dContext->flushAndSubmit();
161 draw_path(dContext.
get(), sdc.get(), path, pathRenderer.
get(), aaType, style);
static void test_path(skiatest::Reporter *reporter, const std::function< SkPath(void)> &createPath, const std::function< skgpu::ganesh::PathRenderer *(GrRecordingContext *)> &makePathRenderer, int expected, bool checkListeners, GrAAType aaType=GrAAType::kNone, GrStyle style=GrStyle(SkStrokeRec::kFill_InitStyle))
static void draw_path(GrRecordingContext *rContext, skgpu::ganesh::SurfaceDrawContext *sdc, const SkPath &path, skgpu::ganesh::PathRenderer *pr, GrAAType aaType, const GrStyle &style, float scaleX=1.f)
static sk_sp< GrDirectContext > MakeMock(const GrMockOptions *, const GrContextOptions &)
static std::unique_ptr< SurfaceDrawContext > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &)