Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: src/gpu/vk/GrVkTexture.cpp

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkTexture.h ('k') | src/gpu/vk/GrVkTextureRenderTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkTexture.cpp
diff --git a/src/gpu/vk/GrVkTexture.cpp b/src/gpu/vk/GrVkTexture.cpp
index bf399a8352f55bafa9338b1fe09a3aeba41050b0..8c461f830853d8618d48df827493bfdcd03586b6 100644
--- a/src/gpu/vk/GrVkTexture.cpp
+++ b/src/gpu/vk/GrVkTexture.cpp
@@ -78,10 +78,10 @@ GrVkTexture* GrVkTexture::CreateNewTexture(GrVkGpu* gpu, SkBudgeted budgeted,
return new GrVkTexture(gpu, budgeted, desc, info, imageView);
}
-GrVkTexture* GrVkTexture::CreateWrappedTexture(GrVkGpu* gpu,
- const GrSurfaceDesc& desc,
- GrWrapOwnership ownership,
- const GrVkImageInfo* info) {
+sk_sp<GrVkTexture> GrVkTexture::MakeWrappedTexture(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);
@@ -96,7 +96,7 @@ GrVkTexture* GrVkTexture::CreateWrappedTexture(GrVkGpu* gpu,
GrVkImage::Wrapped wrapped = kBorrow_GrWrapOwnership == ownership ? GrVkImage::kBorrowed_Wrapped
: GrVkImage::kAdopted_Wrapped;
- return new GrVkTexture(gpu, kWrapped, desc, *info, imageView, wrapped);
+ return sk_sp<GrVkTexture>(new GrVkTexture(gpu, kWrapped, desc, *info, imageView, wrapped));
}
GrVkTexture::~GrVkTexture() {
« no previous file with comments | « src/gpu/vk/GrVkTexture.h ('k') | src/gpu/vk/GrVkTextureRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698