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/tests/VkBackendSurfaceTest.cpp b/tests/VkBackendSurfaceTest.cpp
index 2540ed0..adc40d9 100644
--- a/tests/VkBackendSurfaceTest.cpp
+++ b/tests/VkBackendSurfaceTest.cpp
@@ -32,10 +32,10 @@
DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkImageLayoutTest, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
- GrBackendTexture backendTex = context->priv().createBackendTexture(1, 1,
- kRGBA_8888_SkColorType,
- GrMipMapped::kNo,
- GrRenderable::kNo);
+ GrBackendTexture backendTex = context->createBackendTexture(1, 1,
+ kRGBA_8888_SkColorType,
+ GrMipMapped::kNo,
+ GrRenderable::kNo);
REPORTER_ASSERT(reporter, backendTex.isValid());
GrVkImageInfo info;
@@ -119,7 +119,7 @@
REPORTER_ASSERT(reporter, invalidTexture.isValid());
REPORTER_ASSERT(reporter, GrBackendTexture::TestingOnly_Equals(invalidTexture, invalidTexture));
- context->priv().deleteBackendTexture(backendTex);
+ context->deleteBackendTexture(backendTex);
}
static void testing_release_proc(void* ctx) {
@@ -138,10 +138,10 @@
}
for (bool useExternal : {false, true}) {
- GrBackendTexture backendTex = context->priv().createBackendTexture(1, 1,
- kRGBA_8888_SkColorType,
- GrMipMapped::kNo,
- GrRenderable::kNo);
+ GrBackendTexture backendTex = context->createBackendTexture(1, 1,
+ kRGBA_8888_SkColorType,
+ GrMipMapped::kNo,
+ GrRenderable::kNo);
sk_sp<SkImage> image;
int count = 0;
if (useExternal) {
@@ -202,7 +202,7 @@
// Now that we flushed and waited the release proc should have be triggered.
REPORTER_ASSERT(reporter, count == 1);
- context->priv().deleteBackendTexture(backendTex);
+ context->deleteBackendTexture(backendTex);
}
}
@@ -222,7 +222,7 @@
// We don't set textures to present
continue;
}
- GrBackendTexture backendTex = context->priv().createBackendTexture(
+ GrBackendTexture backendTex = context->createBackendTexture(
4, 4, kRGBA_8888_SkColorType, GrMipMapped::kNo,
useSurface ? GrRenderable::kYes : GrRenderable::kNo);
@@ -323,7 +323,7 @@
GrFlushInfo flushInfo;
flushInfo.fFlags = kSyncCpu_GrFlushFlag;
context->flush(flushInfo);
- context->priv().deleteBackendTexture(backendTex);
+ context->deleteBackendTexture(backendTex);
}
}
}
@@ -338,7 +338,7 @@
return;
}
- GrBackendTexture backendTex = context->priv().createBackendTexture(
+ GrBackendTexture backendTex = context->createBackendTexture(
1, 1, kRGBA_8888_SkColorType, GrMipMapped::kNo, GrRenderable::kNo);
sk_sp<SkImage> image;
// Make a backend texture with an external queue family and general layout.
@@ -377,7 +377,7 @@
image.reset();
gpu->testingOnly_flushGpuAndSync();
- context->priv().deleteBackendTexture(backendTex);
+ context->deleteBackendTexture(backendTex);
}
#endif