Index: src/gpu/vk/GrVkBuffer.h |
diff --git a/src/gpu/vk/GrVkBuffer.h b/src/gpu/vk/GrVkBuffer.h |
index b400e09916f4580587d29097250e199daed8f30b..bb529b3f7366dda79a4ce34210ceca0bb9969fb4 100644 |
--- a/src/gpu/vk/GrVkBuffer.h |
+++ b/src/gpu/vk/GrVkBuffer.h |
@@ -25,11 +25,11 @@ public: |
SkASSERT(!fResource); |
} |
- VkBuffer buffer() const { return fResource->fBuffer; } |
- const GrVkAlloc& alloc() const { return fResource->fAlloc; } |
- const GrVkResource* resource() const { return fResource; } |
- size_t size() const { return fDesc.fSizeInBytes; } |
- VkDeviceSize offset() const { return fOffset; } |
+ VkBuffer buffer() const { return fResource->fBuffer; } |
+ const GrVkAlloc& alloc() const { return fResource->fAlloc; } |
+ const GrVkRecycledResource* resource() const { return fResource; } |
+ size_t size() const { return fDesc.fSizeInBytes; } |
+ VkDeviceSize offset() const { return fOffset; } |
void addMemoryBarrier(const GrVkGpu* gpu, |
VkAccessFlags srcAccessMask, |
@@ -94,6 +94,11 @@ protected: |
void vkRelease(const GrVkGpu* gpu); |
private: |
+ virtual const Resource* createResource(GrVkGpu* gpu, |
+ const Desc& descriptor) { |
+ return Create(gpu, descriptor); |
+ } |
+ |
void validate() const; |
bool vkIsMapped() const; |