Switch all internel uses of GrContext::createBackendTexture over to initialized versions
For Skia's testing we always want an initialized backend texture. Except for the
BackendAllocationTests of course.
Change-Id: I47b5e4c9845b3f58ebad5ba052780a69d6cd6954
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216348
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index 15718c7..d0a9903 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -40,8 +40,9 @@
// 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->createBackendTexture(
- kSize, kSize, kRGBA_8888_SkColorType, mipMapped, renderable);
+ GrBackendTexture backendTex = context->priv().createBackendTexture(
+ kSize, kSize, kRGBA_8888_SkColorType,
+ SkColors::kTransparent, mipMapped, renderable);
sk_sp<GrTextureProxy> proxy;
sk_sp<SkImage> image;
@@ -105,8 +106,9 @@
for (auto mipMapped : {GrMipMapped::kNo, GrMipMapped::kYes}) {
for (auto willUseMips : {false, true}) {
- GrBackendTexture backendTex = context->createBackendTexture(
- kSize, kSize, kRGBA_8888_SkColorType, mipMapped, GrRenderable::kNo);
+ GrBackendTexture backendTex = context->priv().createBackendTexture(
+ kSize, kSize, kRGBA_8888_SkColorType,
+ SkColors::kTransparent, mipMapped, GrRenderable::kNo);
sk_sp<SkImage> image = SkImage::MakeFromTexture(context, backendTex,
kTopLeft_GrSurfaceOrigin,
@@ -247,8 +249,9 @@
for (auto isWrapped : {false, true}) {
GrMipMapped mipMapped = willUseMips ? GrMipMapped::kYes : GrMipMapped::kNo;
sk_sp<SkSurface> surface;
- GrBackendTexture backendTex = context->createBackendTexture(
- kSize, kSize, kRGBA_8888_SkColorType, mipMapped, GrRenderable::kYes);
+ GrBackendTexture backendTex = context->priv().createBackendTexture(
+ kSize, kSize, kRGBA_8888_SkColorType,
+ SkColors::kTransparent, mipMapped, GrRenderable::kYes);
if (isWrapped) {
surface = SkSurface::MakeFromBackendTexture(context,
backendTex,