OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrVkImage_DEFINED | 8 #ifndef GrVkImage_DEFINED |
9 #define GrVkImage_DEFINED | 9 #define GrVkImage_DEFINED |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 VkImage fImage; | 31 VkImage fImage; |
32 VkDeviceMemory fAlloc; | 32 VkDeviceMemory fAlloc; |
33 VkFormat fFormat; | 33 VkFormat fFormat; |
34 uint32_t fFlags; | 34 uint32_t fFlags; |
35 | 35 |
36 Resource() | 36 Resource() |
37 : INHERITED() | 37 : INHERITED() |
38 , fImage(VK_NULL_HANDLE) | 38 , fImage(VK_NULL_HANDLE) |
39 , fAlloc(VK_NULL_HANDLE) | 39 , fAlloc(VK_NULL_HANDLE) |
40 , fFlags(kNo_Flags) | 40 , fFormat(VK_FORMAT_UNDEFINED) |
41 , fFormat(VK_FORMAT_UNDEFINED) {} | 41 , fFlags(kNo_Flags) {} |
42 | 42 |
43 Resource(VkImage image, VkDeviceMemory alloc, uint32_t flags, VkFormat f
ormat) | 43 Resource(VkImage image, VkDeviceMemory alloc, uint32_t flags, VkFormat f
ormat) |
44 : fImage(image), fAlloc(alloc), fFlags(flags), fFormat(format) {} | 44 : fImage(image), fAlloc(alloc), fFormat(format), fFlags(flags) {} |
45 | 45 |
46 ~Resource() override {} | 46 ~Resource() override {} |
47 | 47 |
48 private: | 48 private: |
49 void freeGPUData(const GrVkGpu* gpu) const override; | 49 void freeGPUData(const GrVkGpu* gpu) const override; |
50 | 50 |
51 typedef GrVkResource INHERITED; | 51 typedef GrVkResource INHERITED; |
52 }; | 52 }; |
53 | 53 |
54 // for wrapped textures | 54 // for wrapped textures |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void releaseImage(const GrVkGpu* gpu); | 119 void releaseImage(const GrVkGpu* gpu); |
120 void abandonImage(); | 120 void abandonImage(); |
121 | 121 |
122 const Resource* fResource; | 122 const Resource* fResource; |
123 | 123 |
124 VkImageLayout fCurrentLayout; | 124 VkImageLayout fCurrentLayout; |
125 | 125 |
126 }; | 126 }; |
127 | 127 |
128 #endif | 128 #endif |
OLD | NEW |