Chromium Code Reviews| Index: src/gpu/vk/GrVkImage.h |
| diff --git a/src/gpu/vk/GrVkImage.h b/src/gpu/vk/GrVkImage.h |
| index 13c6e369d0fe3252a2918a7baa22e48453ee8d53..7990a829c296e72f10a0f672de3177433949effe 100644 |
| --- a/src/gpu/vk/GrVkImage.h |
| +++ b/src/gpu/vk/GrVkImage.h |
| @@ -28,11 +28,17 @@ public: |
| VkImage fImage; |
| VkDeviceMemory fAlloc; |
| Flags fFlags; |
| + VkFormat fFormat; |
| - Resource() : INHERITED(), fImage(VK_NULL_HANDLE), fAlloc(VK_NULL_HANDLE), fFlags(kNo_Flags) {} |
| + Resource() |
| + : INHERITED(), |
| + fImage(VK_NULL_HANDLE), |
|
jvanverth1
2016/04/21 13:25:24
Nit: usually we put the commas before the variable
egdaniel
2016/04/21 14:09:20
Woops no idea why my mind did this opposite here.
|
| + fAlloc(VK_NULL_HANDLE), |
| + fFlags(kNo_Flags), |
| + fFormat(VK_FORMAT_UNDEFINED) {} |
| - Resource(VkImage image, VkDeviceMemory alloc, Flags flags) |
| - : fImage(image), fAlloc(alloc), fFlags(flags) {} |
| + Resource(VkImage image, VkDeviceMemory alloc, Flags flags, VkFormat format) |
| + : fImage(image), fAlloc(alloc), fFlags(flags), fFormat(format) {} |
| ~Resource() override {} |
| private: |
| @@ -44,8 +50,8 @@ public: |
| // for wrapped textures |
| class BorrowedResource : public Resource { |
| public: |
| - BorrowedResource(VkImage image, VkDeviceMemory alloc, Flags flags) |
| - : Resource(image, alloc, flags) {} |
| + BorrowedResource(VkImage image, VkDeviceMemory alloc, Flags flags, VkFormat format) |
| + : Resource(image, alloc, flags, format) {} |
| private: |
| void freeGPUData(const GrVkGpu* gpu) const override; |
| }; |
| @@ -70,7 +76,8 @@ public: |
| VkImageLayout currentLayout() const { return fCurrentLayout; } |
| - void setImageLayout(const GrVkGpu* gpu, VkImageLayout newLayout, |
| + void setImageLayout(const GrVkGpu* gpu, |
| + VkImageLayout newLayout, |
| VkAccessFlags srcAccessMask, |
| VkAccessFlags dstAccessMask, |
| VkPipelineStageFlags srcStageMask, |