Make color initialization version of createBackendTexture public

Mechanical.

Change-Id: I48be78a12684fc5243ee509e391984daa190fb7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218182
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 248ab6d..473be2b 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1388,7 +1388,7 @@
                                                   &props);
             break;
         case SkCommandLineConfigGpu::SurfType::kBackendTexture:
-            backendTexture = context->priv().createBackendTexture(
+            backendTexture = context->createBackendTexture(
                     info.width(), info.height(), info.colorType(), SkColors::kTransparent,
                     GrMipMapped::kNo, GrRenderable::kYes);
             surface = SkSurface::MakeFromBackendTexture(context, backendTexture,
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp
index 6667d2f..9db63e4 100644
--- a/gm/imagefromyuvtextures.cpp
+++ b/gm/imagefromyuvtextures.cpp
@@ -142,7 +142,7 @@
 
     void createResultTexture(GrContext* context, int width, int height,
                              GrBackendTexture* resultTexture) {
-        *resultTexture = context->priv().createBackendTexture(
+        *resultTexture = context->createBackendTexture(
                 width, height, kRGBA_8888_SkColorType, SkColors::kTransparent,
                 GrMipMapped::kNo, GrRenderable::kYes);
 
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 850e157..f5914d9 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -346,8 +346,10 @@
     * before deleting the GrContext used to create them. Additionally, clients should only
     * delete these objects on the thread for which that GrContext is active.
     *
-    * Additionally, the client is responsible for ensuring synchronization between different uses
-    * of the backend object.
+    * The client is responsible for ensuring synchronization between different uses
+    * of the backend object (i.e., wrapping it in a surface, rendering to it, deleting the
+    * surface, rewrapping it in a image and drawing the image will require explicit
+    * sychronization on the client's part).
     */
 
     // If possible, create an uninitialized backend texture. The client should ensure that the
@@ -366,6 +368,20 @@
                                           GrMipMapped,
                                           GrRenderable);
 
+    // If possible, create a backend texture initialized to a particular color. The client should
+    // ensure that the returned backend texture is valid.
+    GrBackendTexture createBackendTexture(int width, int height,
+                                          GrBackendFormat, const SkColor4f& color,
+                                          GrMipMapped, GrRenderable);
+
+    // If possible, create a backend texture initialized to a particular color. The client should
+    // ensure that the returned backend texture is valid.
+    // If successful, the created backend texture will be compatible with the provided
+    // SkColorType.
+    GrBackendTexture createBackendTexture(int width, int height,
+                                          SkColorType, const SkColor4f& color,
+                                          GrMipMapped, GrRenderable);
+
     void deleteBackendTexture(GrBackendTexture);
 
 protected:
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index d6bc93c..054456f 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -392,6 +392,49 @@
     return this->createBackendTexture(width, height, format, mipMapped, renderable);
 }
 
+GrBackendTexture GrContext::createBackendTexture(int width, int height,
+                                                 GrBackendFormat backendFormat,
+                                                 const SkColor4f& color,
+                                                 GrMipMapped mipMapped,
+                                                 GrRenderable renderable) {
+    if (!this->asDirectContext()) {
+        return GrBackendTexture();
+    }
+
+    if (this->abandoned()) {
+        return GrBackendTexture();
+    }
+
+    if (!backendFormat.isValid()) {
+        return GrBackendTexture();
+    }
+
+    return fGpu->createBackendTexture(width, height, backendFormat,
+                                      mipMapped, renderable,
+                                      nullptr, 0, color);
+}
+
+GrBackendTexture GrContext::createBackendTexture(int width, int height,
+                                                 SkColorType colorType,
+                                                 const SkColor4f& color,
+                                                 GrMipMapped mipMapped,
+                                                 GrRenderable renderable) {
+    if (!this->asDirectContext()) {
+        return GrBackendTexture();
+    }
+
+    if (this->abandoned()) {
+        return GrBackendTexture();
+    }
+
+    GrBackendFormat format = this->caps()->getBackendFormatFromColorType(colorType);
+    if (!format.isValid()) {
+        return GrBackendTexture();
+    }
+
+    return this->createBackendTexture(width, height, format, color, mipMapped, renderable);
+}
+
 void GrContext::deleteBackendTexture(GrBackendTexture backendTex) {
     if (this->abandoned() || !backendTex.isValid()) {
         return;
diff --git a/src/gpu/GrContextPriv.cpp b/src/gpu/GrContextPriv.cpp
index 2ab6822..6a482d1 100644
--- a/src/gpu/GrContextPriv.cpp
+++ b/src/gpu/GrContextPriv.cpp
@@ -760,48 +760,3 @@
     fContext->drawingManager()->testingOnly_removeOnFlushCallbackObject(cb);
 }
 #endif
-
-//////////////////////////////////////////////////////////////////////////////
-GrBackendTexture GrContextPriv::createBackendTexture(int width, int height,
-                                                     GrBackendFormat backendFormat,
-                                                     const SkColor4f& color,
-                                                     GrMipMapped mipMapped,
-                                                     GrRenderable renderable) {
-    if (!fContext->asDirectContext()) {
-        return GrBackendTexture();
-    }
-
-    if (this->abandoned()) {
-        return GrBackendTexture();
-    }
-
-    if (!backendFormat.isValid()) {
-        return GrBackendTexture();
-    }
-
-    GrGpu* gpu = fContext->fGpu.get();
-
-    return gpu->createBackendTexture(width, height, backendFormat,
-                                     mipMapped, renderable, nullptr, 0, color);
-}
-
-GrBackendTexture GrContextPriv::createBackendTexture(int width, int height,
-                                                     SkColorType colorType,
-                                                     const SkColor4f& color,
-                                                     GrMipMapped mipMapped,
-                                                     GrRenderable renderable) {
-    if (!fContext->asDirectContext()) {
-        return GrBackendTexture();
-    }
-
-    if (this->abandoned()) {
-        return GrBackendTexture();
-    }
-
-    GrBackendFormat format = fContext->caps()->getBackendFormatFromColorType(colorType);
-    if (!format.isValid()) {
-        return GrBackendTexture();
-    }
-
-    return this->createBackendTexture(width, height, format, color, mipMapped, renderable);
-}
diff --git a/src/gpu/GrContextPriv.h b/src/gpu/GrContextPriv.h
index 5dbb038..86af1f3 100644
--- a/src/gpu/GrContextPriv.h
+++ b/src/gpu/GrContextPriv.h
@@ -292,20 +292,6 @@
     void testingOnly_flushAndRemoveOnFlushCallbackObject(GrOnFlushCallbackObject*);
 #endif
 
-    // If possible, create a backend texture initialized to a particular color. The client should
-    // ensure that the returned backend texture is valid.
-    GrBackendTexture createBackendTexture(int width, int height,
-                                          GrBackendFormat, const SkColor4f& color,
-                                          GrMipMapped, GrRenderable);
-
-    // If possible, create a backend texture initialized to a particular color. The client should
-    // ensure that the returned backend texture is valid.
-    // If successful, the created backend texture will be compatible with the provided
-    // SkColorType.
-    GrBackendTexture createBackendTexture(int width, int height,
-                                          SkColorType, const SkColor4f& color,
-                                          GrMipMapped, GrRenderable);
-
 private:
     explicit GrContextPriv(GrContext* context) : fContext(context) {}
     GrContextPriv(const GrContextPriv&); // unimpl
diff --git a/tests/BackendAllocationTest.cpp b/tests/BackendAllocationTest.cpp
index 701eae4..e76d210 100644
--- a/tests/BackendAllocationTest.cpp
+++ b/tests/BackendAllocationTest.cpp
@@ -365,8 +365,8 @@
                                                           const SkColor4f& color,
                                                           GrMipMapped mipMapped,
                                                           GrRenderable renderable) {
-                        return context->priv().createBackendTexture(32, 32, colorType, color,
-                                                                    mipMapped, renderable);
+                        return context->createBackendTexture(32, 32, colorType, color,
+                                                             mipMapped, renderable);
                     };
 
                     test_color_init(context, reporter, createWithColorMtd,
@@ -527,8 +527,8 @@
                                                        const SkColor4f& color,
                                                        GrMipMapped mipMapped,
                                                        GrRenderable renderable) {
-                        return context->priv().createBackendTexture(32, 32, format, color,
-                                                                    mipMapped, renderable);
+                        return context->createBackendTexture(32, 32, format, color,
+                                                             mipMapped, renderable);
                     };
 
                     test_color_init(context, reporter, createWithColorMtd,
@@ -637,8 +637,8 @@
                                                        const SkColor4f& color,
                                                        GrMipMapped mipMapped,
                                                        GrRenderable renderable) {
-                        return context->priv().createBackendTexture(32, 32, format, color,
-                                                                    mipMapped, renderable);
+                        return context->createBackendTexture(32, 32, format, color,
+                                                             mipMapped, renderable);
                     };
 
                     test_color_init(context, reporter, createWithColorMtd,
diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp
index 5ab80bf..f128f6c 100644
--- a/tests/DeferredDisplayListTest.cpp
+++ b/tests/DeferredDisplayListTest.cpp
@@ -185,9 +185,9 @@
                                                           fColorType, fColorSpace, &fSurfaceProps);
         }
 
-        *backend = context->priv().createBackendTexture(fWidth, fHeight, fColorType,
-                                                        SkColors::kTransparent,
-                                                        mipmapped, GrRenderable::kYes);
+        *backend = context->createBackendTexture(fWidth, fHeight, fColorType,
+                                                 SkColors::kTransparent,
+                                                 mipmapped, GrRenderable::kYes);
         if (!backend->isValid() || !gpu->isTestingOnlyBackendTexture(*backend)) {
             return nullptr;
         }
@@ -578,7 +578,7 @@
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLWrapBackendTest, reporter, ctxInfo) {
     GrContext* context = ctxInfo.grContext();
 
-    GrBackendTexture backendTex = context->priv().createBackendTexture(
+    GrBackendTexture backendTex = context->createBackendTexture(
             kSize, kSize, kRGBA_8888_SkColorType,
             SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
     if (!backendTex.isValid()) {
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp
index 7818ede..96483a5 100644
--- a/tests/EGLImageTest.cpp
+++ b/tests/EGLImageTest.cpp
@@ -87,9 +87,9 @@
     GrGpu* gpu1 = context1->priv().getGpu();
     static const int kSize = 100;
     backendTexture1 =
-        context1->priv().createBackendTexture(kSize, kSize, kRGBA_8888_SkColorType,
-                                              SkColors::kTransparent,
-                                              GrMipMapped::kNo, GrRenderable::kNo);
+        context1->createBackendTexture(kSize, kSize, kRGBA_8888_SkColorType,
+                                       SkColors::kTransparent,
+                                       GrMipMapped::kNo, GrRenderable::kNo);
 
     if (!backendTexture1.isValid() || !gpu1->isTestingOnlyBackendTexture(backendTexture1)) {
         ERRORF(reporter, "Error creating texture for EGL Image");
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index d0a9903..ef0ef66 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -40,7 +40,7 @@
             // createBackendTexture currently doesn't support uploading data to mip maps
             // so we don't send any. However, we pretend there is data for the checks below which is
             // fine since we are never actually using these textures for any work on the gpu.
-            GrBackendTexture backendTex = context->priv().createBackendTexture(
+            GrBackendTexture backendTex = context->createBackendTexture(
                     kSize, kSize, kRGBA_8888_SkColorType,
                     SkColors::kTransparent, mipMapped, renderable);
 
@@ -106,7 +106,7 @@
 
     for (auto mipMapped : {GrMipMapped::kNo, GrMipMapped::kYes}) {
         for (auto willUseMips : {false, true}) {
-            GrBackendTexture backendTex = context->priv().createBackendTexture(
+            GrBackendTexture backendTex = context->createBackendTexture(
                     kSize, kSize, kRGBA_8888_SkColorType,
                     SkColors::kTransparent, mipMapped, GrRenderable::kNo);
 
@@ -249,7 +249,7 @@
         for (auto isWrapped : {false, true}) {
             GrMipMapped mipMapped = willUseMips ? GrMipMapped::kYes : GrMipMapped::kNo;
             sk_sp<SkSurface> surface;
-            GrBackendTexture backendTex = context->priv().createBackendTexture(
+            GrBackendTexture backendTex = context->createBackendTexture(
                     kSize, kSize, kRGBA_8888_SkColorType,
                     SkColors::kTransparent, mipMapped, GrRenderable::kYes);
             if (isWrapped) {
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index ae14978..79b36e6 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -997,8 +997,8 @@
     }
 
     GrBackendTexture backendTex =
-        ctx->priv().createBackendTexture(100, 100, kRGBA_8888_SkColorType, SkColors::kTransparent,
-                                         GrMipMapped::kNo, GrRenderable::kNo);
+        ctx->createBackendTexture(100, 100, kRGBA_8888_SkColorType, SkColors::kTransparent,
+                                  GrMipMapped::kNo, GrRenderable::kNo);
 
     GrXferProcessor::DstProxy fakeDstProxy;
     {
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 6d4e70e..178d6d6 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -52,7 +52,7 @@
     REPORTER_ASSERT(reporter, tex1.get() == tex1->asTexture());
     REPORTER_ASSERT(reporter, static_cast<GrSurface*>(tex1.get()) == tex1->asTexture());
 
-    GrBackendTexture backendTex = context->priv().createBackendTexture(
+    GrBackendTexture backendTex = context->createBackendTexture(
         256, 256, kRGBA_8888_SkColorType,
         SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
 
@@ -331,7 +331,7 @@
         // Mip regen should not work with a read only texture.
         if (context->priv().caps()->mipMapSupport()) {
             delete_backend_texture(context, backendTex);
-            backendTex = context->priv().createBackendTexture(
+            backendTex = context->createBackendTexture(
                     kSize, kSize, kRGBA_8888_SkColorType,
                     SkColors::kTransparent, GrMipMapped::kYes, GrRenderable::kYes);
             proxy = proxyProvider->wrapBackendTexture(backendTex, kTopLeft_GrSurfaceOrigin,
@@ -348,7 +348,7 @@
 }
 
 static sk_sp<GrTexture> make_wrapped_texture(GrContext* context, GrRenderable renderable) {
-    auto backendTexture = context->priv().createBackendTexture(
+    auto backendTexture = context->createBackendTexture(
             10, 10, kRGBA_8888_SkColorType, SkColors::kTransparent, GrMipMapped::kNo, renderable);
     sk_sp<GrTexture> texture;
     if (GrRenderable::kYes == renderable) {
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 8e443db..c8fbacf 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -490,7 +490,7 @@
         SkColorType colorType = static_cast<SkColorType>(ct);
         bool can = context->colorTypeSupportedAsImage(colorType);
 
-        GrBackendTexture backendTex = context->priv().createBackendTexture(
+        GrBackendTexture backendTex = context->createBackendTexture(
                 kSize, kSize, colorType, SkColors::kTransparent,
                 GrMipMapped::kNo, GrRenderable::kNo);
 
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index ed91e08..da92b6b 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -471,7 +471,7 @@
         desc.fHeight = kSize;
         desc.fConfig = kRGBA_8888_GrPixelConfig;
 
-        GrBackendTexture backendTex = ctx->priv().createBackendTexture(
+        GrBackendTexture backendTex = ctx->createBackendTexture(
                 kSize, kSize, kRGBA_8888_SkColorType, SkColors::kTransparent,
                 GrMipMapped::kNo, GrRenderable::kNo);
 
diff --git a/tests/PromiseImageTest.cpp b/tests/PromiseImageTest.cpp
index 30ced46..38c513e 100644
--- a/tests/PromiseImageTest.cpp
+++ b/tests/PromiseImageTest.cpp
@@ -167,7 +167,7 @@
     GrContext* ctx = ctxInfo.grContext();
     GrGpu* gpu = ctx->priv().getGpu();
 
-    GrBackendTexture backendTex = ctx->priv().createBackendTexture(
+    GrBackendTexture backendTex = ctx->createBackendTexture(
             kWidth, kHeight, kRGBA_8888_SkColorType,
             SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kYes);
     REPORTER_ASSERT(reporter, backendTex.isValid());
@@ -243,12 +243,12 @@
     GrContext* ctx = ctxInfo.grContext();
     GrGpu* gpu = ctx->priv().getGpu();
 
-    GrBackendTexture backendTex1 = ctx->priv().createBackendTexture(
+    GrBackendTexture backendTex1 = ctx->createBackendTexture(
             kWidth, kHeight, kGray_8_SkColorType,
             SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
     REPORTER_ASSERT(reporter, backendTex1.isValid());
 
-    GrBackendTexture backendTex2 = ctx->priv().createBackendTexture(
+    GrBackendTexture backendTex2 = ctx->createBackendTexture(
             kWidth, kHeight, kAlpha_8_SkColorType,
             SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
     REPORTER_ASSERT(reporter, backendTex2.isValid());
@@ -355,7 +355,7 @@
                 continue;
             }
 
-            GrBackendTexture backendTex = ctx->priv().createBackendTexture(
+            GrBackendTexture backendTex = ctx->createBackendTexture(
                     kWidth, kHeight, kAlpha_8_SkColorType,
                     SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
             REPORTER_ASSERT(reporter, backendTex.isValid());
@@ -394,7 +394,7 @@
 
     GrContext* ctx = ctxInfo.grContext();
 
-    GrBackendTexture backendTex = ctx->priv().createBackendTexture(
+    GrBackendTexture backendTex = ctx->createBackendTexture(
             kWidth, kHeight, kAlpha_8_SkColorType,
             SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
     REPORTER_ASSERT(reporter, backendTex.isValid());
@@ -458,7 +458,7 @@
     GrContext* ctx = ctxInfo.grContext();
 
     // Do all this just to get a valid backend format for the image.
-    GrBackendTexture backendTex = ctx->priv().createBackendTexture(
+    GrBackendTexture backendTex = ctx->createBackendTexture(
             kWidth, kHeight, kRGBA_8888_SkColorType,
             SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kYes);
     REPORTER_ASSERT(reporter, backendTex.isValid());
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 43bad46..8b5e130 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -275,11 +275,11 @@
                 // Tests wrapBackendRenderTarget with a GrBackendTexture
                 {
                     GrBackendTexture backendTex =
-                            context->priv().createBackendTexture(kWidthHeight, kWidthHeight,
-                                                                 colorType,
-                                                                 SkColors::kTransparent,
-                                                                 GrMipMapped::kNo,
-                                                                 GrRenderable::kYes);
+                            context->createBackendTexture(kWidthHeight, kWidthHeight,
+                                                          colorType,
+                                                          SkColors::kTransparent,
+                                                          GrMipMapped::kNo,
+                                                          GrRenderable::kYes);
                     sk_sp<GrSurfaceProxy> sProxy = proxyProvider->wrapBackendTextureAsRenderTarget(
                             backendTex, origin, supportedNumSamples);
                     if (!sProxy) {
@@ -301,11 +301,11 @@
                 // Tests wrapBackendTexture that is only renderable
                 {
                     GrBackendTexture backendTex =
-                            context->priv().createBackendTexture(kWidthHeight, kWidthHeight,
-                                                                 colorType,
-                                                                 SkColors::kTransparent,
-                                                                 GrMipMapped::kNo,
-                                                                 GrRenderable::kYes);
+                            context->createBackendTexture(kWidthHeight, kWidthHeight,
+                                                          colorType,
+                                                          SkColors::kTransparent,
+                                                          GrMipMapped::kNo,
+                                                          GrRenderable::kYes);
 
                     sk_sp<GrSurfaceProxy> sProxy = proxyProvider->wrapRenderableBackendTexture(
                             backendTex, origin, supportedNumSamples, kBorrow_GrWrapOwnership,
@@ -330,11 +330,11 @@
                 {
                     // Internal offscreen texture
                     GrBackendTexture backendTex =
-                            context->priv().createBackendTexture(kWidthHeight, kWidthHeight,
-                                                                 colorType,
-                                                                 SkColors::kTransparent,
-                                                                 GrMipMapped::kNo,
-                                                                 GrRenderable::kNo);
+                            context->createBackendTexture(kWidthHeight, kWidthHeight,
+                                                          colorType,
+                                                          SkColors::kTransparent,
+                                                          GrMipMapped::kNo,
+                                                          GrRenderable::kNo);
 
                     sk_sp<GrSurfaceProxy> sProxy = proxyProvider->wrapBackendTexture(
                             backendTex, origin, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo,
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index 3433329..c23c85e 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -62,9 +62,9 @@
                                     GrBackendTexture* backendTex) {
     GrProxyProvider* proxyProvider = context->priv().proxyProvider();
 
-    *backendTex = context->priv().createBackendTexture(p.fSize, p.fSize, p.fColorType,
-                                                       SkColors::kTransparent,
-                                                       GrMipMapped::kNo, GrRenderable::kNo);
+    *backendTex = context->createBackendTexture(p.fSize, p.fSize, p.fColorType,
+                                                SkColors::kTransparent,
+                                                GrMipMapped::kNo, GrRenderable::kNo);
     if (!backendTex->isValid()) {
         return nullptr;
     }
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index c6611dd..caed56b 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -209,12 +209,12 @@
     static const int kW = 100;
     static const int kH = 100;
 
-    backendTextures[0] = context->priv().createBackendTexture(kW, kH, kRGBA_8888_SkColorType,
-                                                              SkColors::kTransparent,
-                                                              GrMipMapped::kNo, GrRenderable::kNo);
-    backendTextures[1] = context->priv().createBackendTexture(kW, kH, kRGBA_8888_SkColorType,
-                                                              SkColors::kTransparent,
-                                                              GrMipMapped::kNo, GrRenderable::kNo);
+    backendTextures[0] = context->createBackendTexture(kW, kH, kRGBA_8888_SkColorType,
+                                                       SkColors::kTransparent,
+                                                       GrMipMapped::kNo, GrRenderable::kNo);
+    backendTextures[1] = context->createBackendTexture(kW, kH, kRGBA_8888_SkColorType,
+                                                       SkColors::kTransparent,
+                                                       GrMipMapped::kNo, GrRenderable::kNo);
     REPORTER_ASSERT(reporter, backendTextures[0].isValid());
     REPORTER_ASSERT(reporter, backendTextures[1].isValid());
     if (!backendTextures[0].isValid() || !backendTextures[1].isValid()) {
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 76ea957..fa9fe79 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -102,7 +102,7 @@
         REPORTER_ASSERT(reporter, can == SkToBool(surf), "ct: %d, can: %d, surf: %d",
                         colorType, can, SkToBool(surf));
 
-        GrBackendTexture backendTex = context->priv().createBackendTexture(
+        GrBackendTexture backendTex = context->createBackendTexture(
                 kSize, kSize, colorType,
                 SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kYes);
         surf = SkSurface::MakeFromBackendTexture(context, backendTex,
@@ -128,9 +128,9 @@
         REPORTER_ASSERT(reporter, can == SkToBool(surf), "ct: %d, can: %d, surf: %d",
                         colorType, can, SkToBool(surf));
 
-        backendTex = context->priv().createBackendTexture(kSize, kSize, colorType,
-                                                          SkColors::kTransparent,
-                                                          GrMipMapped::kNo, GrRenderable::kYes);
+        backendTex = context->createBackendTexture(kSize, kSize, colorType,
+                                                   SkColors::kTransparent,
+                                                   GrMipMapped::kNo, GrRenderable::kYes);
         surf = SkSurface::MakeFromBackendTexture(context, backendTex,
                                                  kTopLeft_GrSurfaceOrigin, kSampleCnt, colorType,
                                                  nullptr, nullptr);
@@ -198,7 +198,7 @@
         if (!max) {
             continue;
         }
-        GrBackendTexture backendTex = context->priv().createBackendTexture(
+        GrBackendTexture backendTex = context->createBackendTexture(
                 kSize, kSize, colorType, SkColors::kTransparent,
                 GrMipMapped::kNo, GrRenderable::kYes);
         if (!backendTex.isValid()) {
diff --git a/tests/TextureBindingsResetTest.cpp b/tests/TextureBindingsResetTest.cpp
index 9cdecd7..67c0994 100644
--- a/tests/TextureBindingsResetTest.cpp
+++ b/tests/TextureBindingsResetTest.cpp
@@ -101,7 +101,7 @@
     context->resetContext();
 
     if (supportExternal) {
-        GrBackendTexture texture2D = context->priv().createBackendTexture(
+        GrBackendTexture texture2D = context->createBackendTexture(
                 10, 10, kRGBA_8888_SkColorType,
                 SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
         GrGLTextureInfo info2D;
diff --git a/tests/VkBackendSurfaceTest.cpp b/tests/VkBackendSurfaceTest.cpp
index 65a4f3d..ced9f88 100644
--- a/tests/VkBackendSurfaceTest.cpp
+++ b/tests/VkBackendSurfaceTest.cpp
@@ -32,11 +32,11 @@
 DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkImageLayoutTest, reporter, ctxInfo) {
     GrContext* context = ctxInfo.grContext();
 
-    GrBackendTexture backendTex = context->priv().createBackendTexture(1, 1,
-                                                                       kRGBA_8888_SkColorType,
-                                                                       SkColors::kTransparent,
-                                                                       GrMipMapped::kNo,
-                                                                       GrRenderable::kNo);
+    GrBackendTexture backendTex = context->createBackendTexture(1, 1,
+                                                                kRGBA_8888_SkColorType,
+                                                                SkColors::kTransparent,
+                                                                GrMipMapped::kNo,
+                                                                GrRenderable::kNo);
     REPORTER_ASSERT(reporter, backendTex.isValid());
 
     GrVkImageInfo info;
@@ -139,11 +139,11 @@
     }
 
     for (bool useExternal : {false, true}) {
-        GrBackendTexture backendTex = context->priv().createBackendTexture(1, 1,
-                                                                           kRGBA_8888_SkColorType,
-                                                                           SkColors::kTransparent,
-                                                                           GrMipMapped::kNo,
-                                                                           GrRenderable::kNo);
+        GrBackendTexture backendTex = context->createBackendTexture(1, 1,
+                                                                    kRGBA_8888_SkColorType,
+                                                                    SkColors::kTransparent,
+                                                                    GrMipMapped::kNo,
+                                                                    GrRenderable::kNo);
         sk_sp<SkImage> image;
         int count = 0;
         if (useExternal) {
@@ -224,7 +224,7 @@
                 // We don't set textures to present
                 continue;
             }
-            GrBackendTexture backendTex = context->priv().createBackendTexture(
+            GrBackendTexture backendTex = context->createBackendTexture(
                     4, 4, kRGBA_8888_SkColorType,
                     SkColors::kTransparent, GrMipMapped::kNo,
                     useSurface ? GrRenderable::kYes : GrRenderable::kNo);
@@ -341,7 +341,7 @@
         return;
     }
 
-    GrBackendTexture backendTex = context->priv().createBackendTexture(
+    GrBackendTexture backendTex = context->createBackendTexture(
             1, 1, kRGBA_8888_SkColorType,
             SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kNo);
     sk_sp<SkImage> image;
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp
index 6aefedb..081cfe4 100644
--- a/tests/VkWrapTests.cpp
+++ b/tests/VkWrapTests.cpp
@@ -36,11 +36,11 @@
 
     GrGpu* gpu = context->priv().getGpu();
 
-    GrBackendTexture origBackendTex = context->priv().createBackendTexture(kW, kH,
-                                                                           kColorType,
-                                                                           SkColors::kTransparent,
-                                                                           GrMipMapped::kNo,
-                                                                           GrRenderable::kNo);
+    GrBackendTexture origBackendTex = context->createBackendTexture(kW, kH,
+                                                                    kColorType,
+                                                                    SkColors::kTransparent,
+                                                                    GrMipMapped::kNo,
+                                                                    GrRenderable::kNo);
     GrVkImageInfo imageInfo;
     SkAssertResult(origBackendTex.getVkImageInfo(&imageInfo));
 
@@ -91,11 +91,11 @@
 void wrap_rt_test(skiatest::Reporter* reporter, GrContext* context) {
     GrGpu* gpu = context->priv().getGpu();
 
-    GrBackendTexture origBackendTex = context->priv().createBackendTexture(kW, kH,
-                                                                           kColorType,
-                                                                           SkColors::kTransparent,
-                                                                           GrMipMapped::kNo,
-                                                                           GrRenderable::kYes);
+    GrBackendTexture origBackendTex = context->createBackendTexture(kW, kH,
+                                                                    kColorType,
+                                                                    SkColors::kTransparent,
+                                                                    GrMipMapped::kNo,
+                                                                    GrRenderable::kYes);
 
     GrVkImageInfo imageInfo;
     SkAssertResult(origBackendTex.getVkImageInfo(&imageInfo));
@@ -135,11 +135,11 @@
 void wrap_trt_test(skiatest::Reporter* reporter, GrContext* context) {
     GrGpu* gpu = context->priv().getGpu();
 
-    GrBackendTexture origBackendTex = context->priv().createBackendTexture(kW, kH,
-                                                                           kColorType,
-                                                                           SkColors::kTransparent,
-                                                                           GrMipMapped::kNo,
-                                                                           GrRenderable::kYes);
+    GrBackendTexture origBackendTex = context->createBackendTexture(kW, kH,
+                                                                    kColorType,
+                                                                    SkColors::kTransparent,
+                                                                    GrMipMapped::kNo,
+                                                                    GrRenderable::kYes);
     GrVkImageInfo imageInfo;
     SkAssertResult(origBackendTex.getVkImageInfo(&imageInfo));
 
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 3e303d2..0badd6b 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -455,7 +455,7 @@
                                           int sampleCnt) {
 
     for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin }) {
-        GrBackendTexture backendTex = context->priv().createBackendTexture(
+        GrBackendTexture backendTex = context->createBackendTexture(
                 DEV_W, DEV_H, kRGBA_8888_SkColorType,
                 SkColors::kTransparent, GrMipMapped::kNo, GrRenderable::kYes);
         if (!backendTex.isValid()) {
diff --git a/tools/gpu/ProxyUtils.cpp b/tools/gpu/ProxyUtils.cpp
index d89bba2..9483088 100644
--- a/tools/gpu/ProxyUtils.cpp
+++ b/tools/gpu/ProxyUtils.cpp
@@ -34,7 +34,7 @@
     sk_sp<GrTextureProxy> proxy;
     if (kBottomLeft_GrSurfaceOrigin == origin) {
         // We (soon will) only support using kBottomLeft with wrapped textures.
-        auto backendTex = context->priv().createBackendTexture(
+        auto backendTex = context->createBackendTexture(
                 width, height, format, SkColors::kTransparent, GrMipMapped::kNo, renderable);
         if (!backendTex.isValid()) {
             return nullptr;