Move explicit backend object allocation API to GrContext
This initial portion of the API should be ready to go. Follow on CLs will add the other entry points.
Change-Id: Ia9c708046ba08b16f9a71558e2bf2c38279abe5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tools/fm/fm.cpp b/tools/fm/fm.cpp
index d5d15d1..7f30a26 100644
--- a/tools/fm/fm.cpp
+++ b/tools/fm/fm.cpp
@@ -280,11 +280,11 @@
break;
case SurfaceType::kBackendTexture:
- backendTexture = context->priv().createBackendTexture(info.width(),
- info.height(),
- info.colorType(),
- GrMipMapped::kNo,
- GrRenderable::kYes);
+ backendTexture = context->createBackendTexture(info.width(),
+ info.height(),
+ info.colorType(),
+ GrMipMapped::kNo,
+ GrRenderable::kYes);
surface = SkSurface::MakeFromBackendTexture(context,
backendTexture,
kTopLeft_GrSurfaceOrigin,
@@ -331,7 +331,7 @@
if (!context->abandoned()) {
surface.reset();
if (backendTexture.isValid()) {
- context->priv().deleteBackendTexture(backendTexture);
+ context->deleteBackendTexture(backendTexture);
}
if (backendRT.isValid()) {
context->priv().getGpu()->deleteTestingOnlyBackendRenderTarget(backendRT);