Convert GrBuffer owners to sk_sp
Change-Id: Id49d775c30f01f4de05f385227c5ed5d90d6839e
Reviewed-on: https://skia-review.googlesource.com/c/187920
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkIndexBuffer.cpp b/src/gpu/vk/GrVkIndexBuffer.cpp
index e56a525..cf4fe98 100644
--- a/src/gpu/vk/GrVkIndexBuffer.cpp
+++ b/src/gpu/vk/GrVkIndexBuffer.cpp
@@ -16,7 +16,7 @@
this->registerWithCache(SkBudgeted::kYes);
}
-GrVkIndexBuffer* GrVkIndexBuffer::Create(GrVkGpu* gpu, size_t size, bool dynamic) {
+sk_sp<GrVkIndexBuffer> GrVkIndexBuffer::Make(GrVkGpu* gpu, size_t size, bool dynamic) {
GrVkBuffer::Desc desc;
desc.fDynamic = dynamic;
desc.fType = GrVkBuffer::kIndex_Type;
@@ -32,7 +32,7 @@
if (!buffer) {
bufferResource->unref(gpu);
}
- return buffer;
+ return sk_sp<GrVkIndexBuffer>(buffer);
}
void GrVkIndexBuffer::onRelease() {