aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/VkBackendSurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-05-10 22:04:08 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-10 22:04:20 +0000
commita0ca909142ba4fd33a1b2750f551e7edbb4b98f1 (patch)
tree862181c21d7464edc3c38fc5c54e0c93b2ff4284 /tests/VkBackendSurfaceTest.cpp
parent27fe397bc0cc1b091f9f85863c62b88156239cf0 (diff)
Revert "Remove GrBackendObject and all related functions from Skia."
This reverts commit ccd4cfc23ebbbecbc6b292359352aad335ad7b73. Reason for revert: Fuchsia not building again. (Flutter roll may have been reverted?) Original change's description: > Remove GrBackendObject and all related functions from Skia. > > Bug: skia: > Change-Id: I59434b7477c0bc26fd982bd81eb97ab94bbba073 > Reviewed-on: https://skia-review.googlesource.com/125822 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Ie2c518b84b0c9513c0c622082de2831088b1ad8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/127480 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/VkBackendSurfaceTest.cpp')
-rw-r--r--tests/VkBackendSurfaceTest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/VkBackendSurfaceTest.cpp b/tests/VkBackendSurfaceTest.cpp
index 3b3a9cec14..6b442a9725 100644
--- a/tests/VkBackendSurfaceTest.cpp
+++ b/tests/VkBackendSurfaceTest.cpp
@@ -84,6 +84,19 @@ DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkImageLayoutTest, reporter, ctxInfo) {
backendTexImage.setVkImageLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
REPORTER_ASSERT(reporter, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL == vkTexture->currentLayout());
+#ifdef SK_SUPPORT_LEGACY_BACKEND_OBJECTS
+ // Verify that modifying the layout via the old textureHandle sitll works in is reflected in the
+ // GrVkTexture and GrBackendTexture.
+ GrVkImageInfo* backendInfo = (GrVkImageInfo*)wrappedImage->getTextureHandle(false);
+ REPORTER_ASSERT(reporter, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL == backendInfo->fImageLayout);
+
+ backendInfo->updateImageLayout(VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
+ REPORTER_ASSERT(reporter,
+ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL == vkTexture->currentLayout());
+ REPORTER_ASSERT(reporter, backendTexImage.getVkImageInfo(&info));
+ REPORTER_ASSERT(reporter, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL == info.fImageLayout);
+#endif
+
vkTexture->updateImageLayout(initLayout);
REPORTER_ASSERT(reporter, backendTex.getVkImageInfo(&info));