diff options
author | 2016-10-27 09:30:08 -0700 | |
---|---|---|
committer | 2016-10-27 09:30:08 -0700 | |
commit | 6bd5284415bd983b0628c4941dff5def40018f5a (patch) | |
tree | 7de7e45431f76db69807204ecdce3ed6fcc4d9e8 /src/gpu/GrTextureProvider.cpp | |
parent | 56380524d903f27627a75e2e1189463999725008 (diff) |
Remove SkAutoTUnref and SkAutoTDelete from public includes.
This also makes the required changed to src, tests, and tools. The few
public APIs modified by this change appear to be unused outside of Skia.
Removing these from the public API makes it easier to ensure users are
no longer using them.
This also updates GrGpu::wrapBackendXXX and the
::onWrapBackendXXX methods to clarify ownership.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002
Review-Url: https://codereview.chromium.org/2448593002
Diffstat (limited to 'src/gpu/GrTextureProvider.cpp')
-rw-r--r-- | src/gpu/GrTextureProvider.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp index 68a5540484..dba24b5926 100644 --- a/src/gpu/GrTextureProvider.cpp +++ b/src/gpu/GrTextureProvider.cpp @@ -158,8 +158,8 @@ GrTexture* GrTextureProvider::refScratchTexture(const GrSurfaceDesc& inDesc, return nullptr; } -GrTexture* GrTextureProvider::wrapBackendTexture(const GrBackendTextureDesc& desc, - GrWrapOwnership ownership) { +sk_sp<GrTexture> GrTextureProvider::wrapBackendTexture(const GrBackendTextureDesc& desc, + GrWrapOwnership ownership) { ASSERT_SINGLE_OWNER if (this->isAbandoned()) { return nullptr; @@ -167,10 +167,12 @@ GrTexture* GrTextureProvider::wrapBackendTexture(const GrBackendTextureDesc& des return fGpu->wrapBackendTexture(desc, ownership); } -GrRenderTarget* GrTextureProvider::wrapBackendRenderTarget(const GrBackendRenderTargetDesc& desc) { +sk_sp<GrRenderTarget> GrTextureProvider::wrapBackendRenderTarget( + const GrBackendRenderTargetDesc& desc) +{ ASSERT_SINGLE_OWNER - return this->isAbandoned() ? nullptr : fGpu->wrapBackendRenderTarget(desc, - kBorrow_GrWrapOwnership); + return this->isAbandoned() ? nullptr + : fGpu->wrapBackendRenderTarget(desc, kBorrow_GrWrapOwnership); } void GrTextureProvider::assignUniqueKeyToResource(const GrUniqueKey& key, GrGpuResource* resource) { |