aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/VkWrapTests.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2016-05-13 11:30:37 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-13 11:30:37 -0700
commitb2df0c2702329be6380a943d548e7377a51d8565 (patch)
treea5eba5adc391c21100069f6952357c9a90751d32 /tests/VkWrapTests.cpp
parent17bf82052f8916c62848c5a3c1d600062bbd8c30 (diff)
Refactor Vulkan image, texture, RTs so that create and getter handles match.
This allows allows us to track and notify clients when either side changes and image layout. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1974983002 Review-Url: https://codereview.chromium.org/1974983002
Diffstat (limited to 'tests/VkWrapTests.cpp')
-rw-r--r--tests/VkWrapTests.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp
index e81ebf5f17..6122655938 100644
--- a/tests/VkWrapTests.cpp
+++ b/tests/VkWrapTests.cpp
@@ -30,7 +30,7 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
GrVkGpu* gpu = static_cast<GrVkGpu*>(context->getGpu());
GrBackendObject backendObj = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kPixelConfig);
- const GrVkTextureInfo* backendTex = reinterpret_cast<const GrVkTextureInfo*>(backendObj);
+ const GrVkImageInfo* backendTex = reinterpret_cast<const GrVkImageInfo*>(backendObj);
// check basic borrowed creation
GrBackendTextureDesc desc;
@@ -43,7 +43,7 @@ void wrap_tex_test(skiatest::Reporter* reporter, GrContext* context) {
tex->unref();
// image is null
- GrVkTextureInfo backendCopy = *backendTex;
+ GrVkImageInfo backendCopy = *backendTex;
backendCopy.fImage = VK_NULL_HANDLE;
desc.fTextureHandle = (GrBackendObject) &backendCopy;
tex = gpu->wrapBackendTexture(desc, kBorrow_GrWrapOwnership);
@@ -72,7 +72,7 @@ void wrap_rt_test(skiatest::Reporter* reporter, GrContext* context) {
GrVkGpu* gpu = static_cast<GrVkGpu*>(context->getGpu());
GrBackendObject backendObj = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kPixelConfig);
- const GrVkTextureInfo* backendTex = reinterpret_cast<const GrVkTextureInfo*>(backendObj);
+ const GrVkImageInfo* backendTex = reinterpret_cast<const GrVkImageInfo*>(backendObj);
// check basic borrowed creation
GrBackendRenderTargetDesc desc;
@@ -88,7 +88,7 @@ void wrap_rt_test(skiatest::Reporter* reporter, GrContext* context) {
rt->unref();
// image is null
- GrVkTextureInfo backendCopy = *backendTex;
+ GrVkImageInfo backendCopy = *backendTex;
backendCopy.fImage = VK_NULL_HANDLE;
desc.fRenderTargetHandle = (GrBackendObject)&backendCopy;
rt = gpu->wrapBackendRenderTarget(desc, kBorrow_GrWrapOwnership);
@@ -119,7 +119,7 @@ void wrap_trt_test(skiatest::Reporter* reporter, GrContext* context) {
GrVkGpu* gpu = static_cast<GrVkGpu*>(context->getGpu());
GrBackendObject backendObj = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kPixelConfig);
- const GrVkTextureInfo* backendTex = reinterpret_cast<const GrVkTextureInfo*>(backendObj);
+ const GrVkImageInfo* backendTex = reinterpret_cast<const GrVkImageInfo*>(backendObj);
// check basic borrowed creation
GrBackendTextureDesc desc;
@@ -133,7 +133,7 @@ void wrap_trt_test(skiatest::Reporter* reporter, GrContext* context) {
tex->unref();
// image is null
- GrVkTextureInfo backendCopy = *backendTex;
+ GrVkImageInfo backendCopy = *backendTex;
backendCopy.fImage = VK_NULL_HANDLE;
desc.fTextureHandle = (GrBackendObject)&backendCopy;
tex = gpu->wrapBackendTexture(desc, kBorrow_GrWrapOwnership);