Add factories to GrSurfaceContext and clean up creation flow.
This CL updates all callers that ending up in GrDrawingManager::makeSurfaceContext
to use the new factory or directly call ctors.
A follow on change will get the rest of the calls which go to
GrDrawingManager::makeRenderTargetContext
Change-Id: I662da654a1ec8b8972c50fe9ce45a9185d4c3dc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260901
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/text/GrAtlasManager.cpp b/src/gpu/text/GrAtlasManager.cpp
index ab47187..0beb3d3 100644
--- a/src/gpu/text/GrAtlasManager.cpp
+++ b/src/gpu/text/GrAtlasManager.cpp
@@ -96,8 +96,8 @@
return false;
}
- auto sContext = context->priv().makeWrappedSurfaceContext(sk_ref_sp(sProxy), colorType,
- kUnknown_SkAlphaType);
+ auto sContext = GrSurfaceContext::Make(context, sk_ref_sp(sProxy), colorType,
+ kUnknown_SkAlphaType, nullptr);
if (!sContext || !sContext->asTextureProxy()) {
return false;
}