aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/VkWrapTests.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-07-19 18:28:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-20 00:21:18 +0000
commitd17f6584df9e48146dac28a1df56fb4978de6ba3 (patch)
treeaff8a4c10de409c9e07c09d936fd9c3b6b32cae3 /tests/VkWrapTests.cpp
parent22b2d8c5e111825440fa3496be1cf030a5bbafd7 (diff)
Remove GrBackendTextureDesc
Change-Id: I2b123d1782400e97ab2ce2f11e3e3d325a13e6c8 Reviewed-on: https://skia-review.googlesource.com/24748 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/VkWrapTests.cpp')
-rw-r--r--tests/VkWrapTests.cpp66
1 files changed, 24 insertions, 42 deletions
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp
index ca0feb5f14..4e363153f0 100644
--- a/tests/VkWrapTests.cpp
+++ b/tests/VkWrapTests.cpp
@@ -38,8 +38,6 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
GrBackendTexture backendTex = GrBackendTexture(kW, kH, *imageInfo);
sk_sp<GrTexture> tex = gpu->wrapBackendTexture(backendTex,
kTopLeft_GrSurfaceOrigin,
- kNone_GrBackendTextureFlag,
- 0,
kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
@@ -49,14 +47,10 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
backendTex = GrBackendTexture(kW, kH, backendCopy);
tex = gpu->wrapBackendTexture(backendTex,
kTopLeft_GrSurfaceOrigin,
- kNone_GrBackendTextureFlag,
- 0,
kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
tex = gpu->wrapBackendTexture(backendTex,
kTopLeft_GrSurfaceOrigin,
- kNone_GrBackendTextureFlag,
- 0,
kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
@@ -66,14 +60,10 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
backendTex = GrBackendTexture(kW, kH, backendCopy);
tex = gpu->wrapBackendTexture(backendTex,
kTopLeft_GrSurfaceOrigin,
- kNone_GrBackendTextureFlag,
- 0,
kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
tex = gpu->wrapBackendTexture(backendTex,
kTopLeft_GrSurfaceOrigin,
- kNone_GrBackendTextureFlag,
- 0,
kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
// check adopt creation
@@ -81,8 +71,6 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
backendTex = GrBackendTexture(kW, kH, backendCopy);
tex = gpu->wrapBackendTexture(backendTex,
kTopLeft_GrSurfaceOrigin,
- kNone_GrBackendTextureFlag,
- 0,
kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
@@ -130,55 +118,49 @@ void wrap_trt_test(skiatest::Reporter* reporter, GrContext* context) {
const GrVkImageInfo* imageInfo = reinterpret_cast<const GrVkImageInfo*>(backendObj);
GrBackendTexture backendTex = GrBackendTexture(kW, kH, *imageInfo);
- sk_sp<GrTexture> tex = gpu->wrapBackendTexture(backendTex,
- kTopLeft_GrSurfaceOrigin,
- kRenderTarget_GrBackendTextureFlag,
- 0,
- kBorrow_GrWrapOwnership);
+ sk_sp<GrTexture> tex = gpu->wrapRenderableBackendTexture(backendTex,
+ kTopLeft_GrSurfaceOrigin,
+ 0,
+ kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
// image is null
GrVkImageInfo backendCopy = *imageInfo;
backendCopy.fImage = VK_NULL_HANDLE;
backendTex = GrBackendTexture(kW, kH, backendCopy);
- tex = gpu->wrapBackendTexture(backendTex,
- kTopLeft_GrSurfaceOrigin,
- kRenderTarget_GrBackendTextureFlag,
- 0,
- kBorrow_GrWrapOwnership);
+ tex = gpu->wrapRenderableBackendTexture(backendTex,
+ kTopLeft_GrSurfaceOrigin,
+ 0,
+ kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
- tex = gpu->wrapBackendTexture(backendTex,
- kTopLeft_GrSurfaceOrigin,
- kRenderTarget_GrBackendTextureFlag,
- 0,
- kAdopt_GrWrapOwnership);
+ tex = gpu->wrapRenderableBackendTexture(backendTex,
+ kTopLeft_GrSurfaceOrigin,
+ 0,
+ kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
// alloc is null
backendCopy.fImage = imageInfo->fImage;
backendCopy.fAlloc = { VK_NULL_HANDLE, 0, 0, 0 };
backendTex = GrBackendTexture(kW, kH, backendCopy);
- tex = gpu->wrapBackendTexture(backendTex,
- kTopLeft_GrSurfaceOrigin,
- kRenderTarget_GrBackendTextureFlag,
- 0,
- kBorrow_GrWrapOwnership);
+ tex = gpu->wrapRenderableBackendTexture(backendTex,
+ kTopLeft_GrSurfaceOrigin,
+ 0,
+ kBorrow_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
- tex = gpu->wrapBackendTexture(backendTex,
- kTopLeft_GrSurfaceOrigin,
- kRenderTarget_GrBackendTextureFlag,
- 0,
- kAdopt_GrWrapOwnership);
+ tex = gpu->wrapRenderableBackendTexture(backendTex,
+ kTopLeft_GrSurfaceOrigin,
+ 0,
+ kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, !tex);
// check adopt creation
backendCopy.fAlloc = imageInfo->fAlloc;
backendTex = GrBackendTexture(kW, kH, backendCopy);
- tex = gpu->wrapBackendTexture(backendTex,
- kTopLeft_GrSurfaceOrigin,
- kRenderTarget_GrBackendTextureFlag,
- 0,
- kAdopt_GrWrapOwnership);
+ tex = gpu->wrapRenderableBackendTexture(backendTex,
+ kTopLeft_GrSurfaceOrigin,
+ 0,
+ kAdopt_GrWrapOwnership);
REPORTER_ASSERT(reporter, tex);
gpu->deleteTestingOnlyBackendTexture(backendObj, true);