Index: src/gpu/vk/GrVkBuffer.cpp |
diff --git a/src/gpu/vk/GrVkBuffer.cpp b/src/gpu/vk/GrVkBuffer.cpp |
index 679132873b7577919dd8794e9875a963c9b4ffe2..9b54dee675a8c1bf7cd200d37ef42065c85fd50c 100644 |
--- a/src/gpu/vk/GrVkBuffer.cpp |
+++ b/src/gpu/vk/GrVkBuffer.cpp |
@@ -163,7 +163,8 @@ bool GrVkBuffer::vkIsMapped() const { |
return SkToBool(fMapPtr); |
} |
-bool GrVkBuffer::vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSizeInBytes) { |
+bool GrVkBuffer::vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSizeInBytes, |
+ bool* createdNewBuffer) { |
SkASSERT(!this->vkIsMapped()); |
VALIDATE(); |
if (srcSizeInBytes > fDesc.fSizeInBytes) { |
@@ -174,6 +175,9 @@ bool GrVkBuffer::vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSiz |
// in use by the command buffer, so we need to create a new one |
fResource->unref(gpu); |
fResource = Create(gpu, fDesc); |
+ if (createdNewBuffer) { |
+ *createdNewBuffer = true; |
+ } |
} |
void* mapPtr; |