Remove atlas creation from GrResourceProvider
This is pulled out of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred) and is only tangentially related to the goal of that CL.
Change-Id: I6b6db4869597070f85ab3b9fea178fc88c104f87
Reviewed-on: https://skia-review.googlesource.com/9106
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tests/DFPathRendererTest.cpp b/tests/DFPathRendererTest.cpp
index ced13f3..96ccbd7 100644
--- a/tests/DFPathRendererTest.cpp
+++ b/tests/DFPathRendererTest.cpp
@@ -18,8 +18,7 @@
// Because of inaccuracies in large floating point values this causes the
// the path renderer to attempt to add a path DF to its atlas that is larger
// than the plot size which used to crash rather than fail gracefully.
-static void test_far_from_origin(GrResourceProvider* rp,
- GrRenderTargetContext* renderTargetContext,
+static void test_far_from_origin(GrContext* ctx, GrRenderTargetContext* renderTargetContext,
GrPathRenderer* pr) {
SkPath path;
path.lineTo(49.0255089839f, 0.473541f);
@@ -47,7 +46,7 @@
paint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
GrNoClip noClip;
- GrPathRenderer::DrawPathArgs args{rp,
+ GrPathRenderer::DrawPathArgs args{ctx,
std::move(paint),
&GrUserStencilSettings::kUnused,
renderTargetContext,
@@ -78,7 +77,7 @@
GrAADistanceFieldPathRenderer dfpr;
ctx->flush();
- test_far_from_origin(ctx->resourceProvider(), rtc.get(), &dfpr);
+ test_far_from_origin(ctx, rtc.get(), &dfpr);
ctx->flush();
}
#endif