| Index: include/gpu/vk/GrVkTypes.h
|
| diff --git a/include/gpu/vk/GrVkTypes.h b/include/gpu/vk/GrVkTypes.h
|
| index 2e6a2556303c19fafe4a4e803dea9f6ba832f055..e2e5aae9cbd45df3c5ae1b58c7e521c5849bf827 100644
|
| --- a/include/gpu/vk/GrVkTypes.h
|
| +++ b/include/gpu/vk/GrVkTypes.h
|
| @@ -27,18 +27,21 @@
|
| ///////////////////////////////////////////////////////////////////////////////
|
| /**
|
| * Types for interacting with Vulkan resources created externally to Skia. GrBackendObjects for
|
| - * Vulkan textures are really const GrVkTextureInfo*
|
| + * Vulkan textures are really const GrVkImageInfo*
|
| */
|
| -
|
| -struct GrVkTextureInfo {
|
| +struct GrVkImageInfo {
|
| VkImage fImage;
|
| - VkDeviceMemory fAlloc; // this may be null iff the texture is an RT and uses borrow semantics
|
| + VkDeviceMemory fAlloc; // can be VK_NULL_HANDLE iff Tex is an RT and uses borrow semantics
|
| VkImageTiling fImageTiling;
|
| VkImageLayout fImageLayout;
|
| VkFormat fFormat;
|
| uint32_t fLevelCount;
|
| +
|
| + // This gives a way for a client to update the layout of the Image if they change the layout
|
| + // while we're still holding onto the wrapped texture.
|
| + void updateImageLayout(VkImageLayout layout) { fImageLayout = layout; }
|
| };
|
|
|
| -GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkTextureInfo*));
|
| +GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkImageInfo*));
|
|
|
| #endif
|
|
|