Index: src/gpu/vk/GrVkTextureRenderTarget.cpp |
diff --git a/src/gpu/vk/GrVkTextureRenderTarget.cpp b/src/gpu/vk/GrVkTextureRenderTarget.cpp |
index 37b68af8276125f4fa537725f1abf648914cdaf5..cfa63be8af40f1c508ef0f2a08d45e8262ac1dc3 100644 |
--- a/src/gpu/vk/GrVkTextureRenderTarget.cpp |
+++ b/src/gpu/vk/GrVkTextureRenderTarget.cpp |
@@ -135,11 +135,11 @@ GrVkTextureRenderTarget::CreateNewTextureRenderTarget(GrVkGpu* gpu, |
return trt; |
} |
-GrVkTextureRenderTarget* |
-GrVkTextureRenderTarget::CreateWrappedTextureRenderTarget(GrVkGpu* gpu, |
- const GrSurfaceDesc& desc, |
- GrWrapOwnership ownership, |
- const GrVkImageInfo* info) { |
+sk_sp<GrVkTextureRenderTarget> |
+GrVkTextureRenderTarget::MakeWrappedTextureRenderTarget(GrVkGpu* gpu, |
+ const GrSurfaceDesc& desc, |
+ GrWrapOwnership ownership, |
+ const GrVkImageInfo* info) { |
SkASSERT(info); |
// Wrapped textures require both image and allocation (because they can be mapped) |
SkASSERT(VK_NULL_HANDLE != info->fImage && VK_NULL_HANDLE != info->fAlloc.fMemory); |
@@ -147,9 +147,7 @@ GrVkTextureRenderTarget::CreateWrappedTextureRenderTarget(GrVkGpu* gpu, |
GrVkImage::Wrapped wrapped = kBorrow_GrWrapOwnership == ownership ? GrVkImage::kBorrowed_Wrapped |
: GrVkImage::kAdopted_Wrapped; |
- GrVkTextureRenderTarget* trt = Create(gpu, desc, *info, SkBudgeted::kNo, wrapped); |
- |
- return trt; |
+ return sk_sp<GrVkTextureRenderTarget>(Create(gpu, desc, *info, SkBudgeted::kNo, wrapped)); |
} |
bool GrVkTextureRenderTarget::updateForMipmap(GrVkGpu* gpu, const GrVkImageInfo& newInfo) { |