Index: src/gpu/vk/GrVkBuffer.h |
diff --git a/src/gpu/vk/GrVkBuffer.h b/src/gpu/vk/GrVkBuffer.h |
index 473a837646efcb6a5ebcabdd2224d76ab26244e9..a3028235425c443e4d259ebd9d9e25a7ce552f84 100644 |
--- a/src/gpu/vk/GrVkBuffer.h |
+++ b/src/gpu/vk/GrVkBuffer.h |
@@ -23,6 +23,7 @@ public: |
virtual ~GrVkBuffer() { |
// either release or abandon should have been called by the owner of this object. |
SkASSERT(!fResource); |
+ delete [] (unsigned char*)fMapPtr; |
} |
VkBuffer buffer() const { return fResource->fBuffer; } |
@@ -83,7 +84,7 @@ protected: |
: fDesc(desc), fResource(resource), fOffset(0), fMapPtr(nullptr) { |
} |
- void* vkMap(const GrVkGpu* gpu); |
+ void* vkMap(GrVkGpu* gpu); |
void vkUnmap(GrVkGpu* gpu); |
// If the caller passes in a non null createdNewBuffer, this function will set the bool to true |
// if it creates a new VkBuffer to upload the data to. |
@@ -99,6 +100,9 @@ private: |
return Create(gpu, descriptor); |
} |
+ void innerMap(GrVkGpu* gpu, size_t size, bool* createdNewBuffer = nullptr); |
+ void innerUnmap(GrVkGpu* gpu, size_t size); |
+ |
void validate() const; |
bool vkIsMapped() const; |