| 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 25 matching lines...) Expand all Loading... |
| 36 fResource = new BorrowedResource(info.fImage, info.fAlloc, info.fIma
geTiling); | 36 fResource = new BorrowedResource(info.fImage, info.fAlloc, info.fIma
geTiling); |
| 37 } else { | 37 } else { |
| 38 fResource = new Resource(info.fImage, info.fAlloc, info.fImageTiling
); | 38 fResource = new Resource(info.fImage, info.fAlloc, info.fImageTiling
); |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 virtual ~GrVkImage(); | 41 virtual ~GrVkImage(); |
| 42 | 42 |
| 43 VkImage image() const { return fInfo.fImage; } | 43 VkImage image() const { return fInfo.fImage; } |
| 44 const GrVkAlloc& alloc() const { return fInfo.fAlloc; } | 44 const GrVkAlloc& alloc() const { return fInfo.fAlloc; } |
| 45 VkFormat imageFormat() const { return fInfo.fFormat; } | 45 VkFormat imageFormat() const { return fInfo.fFormat; } |
| 46 uint32_t mipLevels() const { return fInfo.fLevelCount; } |
| 46 const Resource* resource() const { return fResource; } | 47 const Resource* resource() const { return fResource; } |
| 47 bool isLinearTiled() const { | 48 bool isLinearTiled() const { |
| 48 return SkToBool(VK_IMAGE_TILING_LINEAR == fInfo.fImageTiling); | 49 return SkToBool(VK_IMAGE_TILING_LINEAR == fInfo.fImageTiling); |
| 49 } | 50 } |
| 50 | 51 |
| 51 VkImageLayout currentLayout() const { return fInfo.fImageLayout; } | 52 VkImageLayout currentLayout() const { return fInfo.fImageLayout; } |
| 52 | 53 |
| 53 void setImageLayout(const GrVkGpu* gpu, | 54 void setImageLayout(const GrVkGpu* gpu, |
| 54 VkImageLayout newLayout, | 55 VkImageLayout newLayout, |
| 55 VkAccessFlags dstAccessMask, | 56 VkAccessFlags dstAccessMask, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 private: | 132 private: |
| 132 void freeGPUData(const GrVkGpu* gpu) const override; | 133 void freeGPUData(const GrVkGpu* gpu) const override; |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 const Resource* fResource; | 136 const Resource* fResource; |
| 136 | 137 |
| 137 friend class GrVkRenderTarget; | 138 friend class GrVkRenderTarget; |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 #endif | 141 #endif |
| OLD | NEW |