Remove more unused ownership arguments

Technically, we only ever pass kAdopt along one specific code path, but
the remaining functions that have it are at least all similar. This was
another outlier that seems unlikely to ever benefit.

BUG=skia:

Change-Id: If9a1275a2a0b83417225660f5e18c2133681830a
Reviewed-on: https://skia-review.googlesource.com/9494
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Brian Osman 2017-03-09 14:19:20 -05:00 committed by Skia Commit-Bot
parent fb58f14643
commit c1e37059a8
3 changed files with 7 additions and 12 deletions

View File

@ -632,11 +632,10 @@ sk_sp<GrSurfaceContext> GrContextPriv::makeDeferredSurfaceContext(const GrSurfac
}
sk_sp<GrSurfaceContext> GrContextPriv::makeBackendSurfaceContext(const GrBackendTextureDesc& desc,
sk_sp<SkColorSpace> colorSpace,
GrWrapOwnership ownership) {
sk_sp<SkColorSpace> colorSpace) {
ASSERT_SINGLE_OWNER_PRIV
sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(desc, ownership));
sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(desc));
if (!surface) {
return nullptr;
}
@ -652,12 +651,11 @@ sk_sp<GrSurfaceContext> GrContextPriv::makeBackendSurfaceContext(const GrBackend
sk_sp<GrRenderTargetContext> GrContextPriv::makeBackendTextureRenderTargetContext(
const GrBackendTextureDesc& desc,
sk_sp<SkColorSpace> colorSpace,
const SkSurfaceProps* props,
GrWrapOwnership ownership) {
const SkSurfaceProps* props) {
ASSERT_SINGLE_OWNER_PRIV
SkASSERT(desc.fFlags & kRenderTarget_GrBackendTextureFlag);
sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(desc, ownership));
sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(desc));
if (!surface) {
return nullptr;
}

View File

@ -39,14 +39,12 @@ public:
// TODO: Maybe add a 'surfaceProps' param (that is ignored for non-RTs) and remove
// makeBackendTextureRenderTargetContext & makeBackendTextureAsRenderTargetRenderTargetContext
sk_sp<GrSurfaceContext> makeBackendSurfaceContext(const GrBackendTextureDesc& desc,
sk_sp<SkColorSpace> colorSpace,
GrWrapOwnership = kBorrow_GrWrapOwnership);
sk_sp<SkColorSpace> colorSpace);
sk_sp<GrRenderTargetContext> makeBackendTextureRenderTargetContext(
const GrBackendTextureDesc& desc,
sk_sp<SkColorSpace> colorSpace,
const SkSurfaceProps* = nullptr,
GrWrapOwnership = kBorrow_GrWrapOwnership);
const SkSurfaceProps* = nullptr);
sk_sp<GrRenderTargetContext> makeBackendRenderTargetRenderTargetContext(
const GrBackendRenderTargetDesc& desc,

View File

@ -224,8 +224,7 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext* context,
sk_sp<GrRenderTargetContext> rtc(context->contextPriv().makeBackendTextureRenderTargetContext(
desc,
std::move(colorSpace),
props,
kBorrow_GrWrapOwnership));
props));
if (!rtc) {
return nullptr;
}