From a0ca909142ba4fd33a1b2750f551e7edbb4b98f1 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 10 May 2018 22:04:08 +0000 Subject: 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 > Commit-Queue: Greg Daniel 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 Commit-Queue: Brian Osman --- tests/VkBackendSurfaceTest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/VkBackendSurfaceTest.cpp') 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)); -- cgit v1.2.3