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 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 enum Flags { | 23 enum Flags { |
24 kNo_Flags = 0, | 24 kNo_Flags = 0, |
25 kLinearTiling_Flag = 0x01 | 25 kLinearTiling_Flag = 0x01 |
26 }; | 26 }; |
27 | 27 |
28 VkImage fImage; | 28 VkImage fImage; |
29 VkDeviceMemory fAlloc; | 29 VkDeviceMemory fAlloc; |
30 Flags fFlags; | 30 Flags fFlags; |
31 | 31 |
32 Resource() : INHERITED(), fImage(nullptr), fAlloc(nullptr), fFlags(kNo_F
lags) {} | 32 Resource() : INHERITED(), fImage(VK_NULL_HANDLE), fAlloc(VK_NULL_HANDLE)
, fFlags(kNo_Flags) {} |
33 | 33 |
34 Resource(VkImage image, VkDeviceMemory alloc, Flags flags) | 34 Resource(VkImage image, VkDeviceMemory alloc, Flags flags) |
35 : fImage(image), fAlloc(alloc), fFlags(flags) {} | 35 : fImage(image), fAlloc(alloc), fFlags(flags) {} |
36 | 36 |
37 ~Resource() override {} | 37 ~Resource() override {} |
38 private: | 38 private: |
39 void freeGPUData(const GrVkGpu* gpu) const override; | 39 void freeGPUData(const GrVkGpu* gpu) const override; |
40 | 40 |
41 typedef GrVkResource INHERITED; | 41 typedef GrVkResource INHERITED; |
42 }; | 42 }; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void releaseImage(const GrVkGpu* gpu); | 99 void releaseImage(const GrVkGpu* gpu); |
100 void abandonImage(); | 100 void abandonImage(); |
101 | 101 |
102 const Resource* fResource; | 102 const Resource* fResource; |
103 | 103 |
104 VkImageLayout fCurrentLayout; | 104 VkImageLayout fCurrentLayout; |
105 | 105 |
106 }; | 106 }; |
107 | 107 |
108 #endif | 108 #endif |
OLD | NEW |