diff options
author | 2017-04-19 00:23:39 +0000 | |
---|---|---|
committer | 2017-04-19 00:23:50 +0000 | |
commit | 7fa5c31c2c9af834bee66d5fcf476e250076c8d6 (patch) | |
tree | 846c27759d4cf4c6487a636872e2e9c88d9137ff /src/gpu/GrContext.cpp | |
parent | edec99b640a7a9dbc7d4fd9f48d35ed3a54c61e3 (diff) |
Revert "Plumb GrBackendTexture throughout skia."
This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12.
Reason for revert: fix android roll
Original change's description:
> Plumb GrBackendTexture throughout skia.
>
> Bug: skia:
> Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
> Reviewed-on: https://skia-review.googlesource.com/13645
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89
Reviewed-on: https://skia-review.googlesource.com/13773
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index f2ed5d6b10..234303fbc9 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -658,15 +658,11 @@ sk_sp<GrSurfaceContext> GrContextPriv::makeDeferredSurfaceContext(const GrSurfac return this->makeWrappedSurfaceContext(std::move(proxy), nullptr); } -sk_sp<GrSurfaceContext> GrContextPriv::makeBackendSurfaceContext(const GrBackendTexture& tex, - GrSurfaceOrigin origin, - GrBackendTextureFlags flags, - int sampleCnt, +sk_sp<GrSurfaceContext> GrContextPriv::makeBackendSurfaceContext(const GrBackendTextureDesc& desc, sk_sp<SkColorSpace> colorSpace) { ASSERT_SINGLE_OWNER_PRIV - sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(tex, origin, - flags, sampleCnt)); + sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(desc)); if (!surface) { return nullptr; } @@ -680,16 +676,13 @@ sk_sp<GrSurfaceContext> GrContextPriv::makeBackendSurfaceContext(const GrBackend } sk_sp<GrRenderTargetContext> GrContextPriv::makeBackendTextureRenderTargetContext( - const GrBackendTexture& tex, - GrSurfaceOrigin origin, - int sampleCnt, + const GrBackendTextureDesc& desc, sk_sp<SkColorSpace> colorSpace, const SkSurfaceProps* props) { ASSERT_SINGLE_OWNER_PRIV + SkASSERT(desc.fFlags & kRenderTarget_GrBackendTextureFlag); - static const GrBackendTextureFlags kForceRT = kRenderTarget_GrBackendTextureFlag; - sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(tex, origin, kForceRT, - sampleCnt)); + sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTexture(desc)); if (!surface) { return nullptr; } @@ -725,17 +718,13 @@ sk_sp<GrRenderTargetContext> GrContextPriv::makeBackendRenderTargetRenderTargetC } sk_sp<GrRenderTargetContext> GrContextPriv::makeBackendTextureAsRenderTargetRenderTargetContext( - const GrBackendTexture& tex, - GrSurfaceOrigin origin, - int sampleCnt, + const GrBackendTextureDesc& desc, sk_sp<SkColorSpace> colorSpace, const SkSurfaceProps* surfaceProps) { ASSERT_SINGLE_OWNER_PRIV + SkASSERT(desc.fFlags & kRenderTarget_GrBackendTextureFlag); - sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTextureAsRenderTarget( - tex, - origin, - sampleCnt)); + sk_sp<GrSurface> surface(fContext->resourceProvider()->wrapBackendTextureAsRenderTarget(desc)); if (!surface) { return nullptr; } |