diff options
author | Robert Phillips <robertphillips@google.com> | 2017-04-27 12:04:15 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-27 21:26:29 +0000 |
commit | cd901046eaa7db876f2b501cfcf90c97fe6f64bf (patch) | |
tree | b24a7648d4cd5b5cf1f2dadf0f3f20ca751c147e /src/gpu | |
parent | 2cbb6662e329981840f90ef4edd62f70f69e6030 (diff) |
Disable deferred proxies in Chrome
We will re-enable once the proxy instantiation is moved past the TextureSamplers
Bug: 715488
Change-Id: I4f0dee18fc191d7fffb6a2f4fedd825729ebb057
Reviewed-on: https://skia-review.googlesource.com/14520
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrSurfaceProxy.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp index fd9a9c443e..76523ce03a 100644 --- a/src/gpu/GrSurfaceProxy.cpp +++ b/src/gpu/GrSurfaceProxy.cpp @@ -198,6 +198,21 @@ sk_sp<GrTextureProxy> GrSurfaceProxy::MakeDeferred(GrResourceProvider* resourceP GrSurfaceDesc copyDesc = desc; copyDesc.fSampleCnt = SkTMin(desc.fSampleCnt, caps->maxSampleCount()); +#ifdef SK_DISABLE_DEFERRED_PROXIES + sk_sp<GrTexture> tex; + + if (SkBackingFit::kApprox == fit) { + tex.reset(resourceProvider->createApproxTexture(copyDesc, flags)); + } else { + tex = resourceProvider->createTexture(copyDesc, budgeted, flags); + } + + if (!tex) { + return nullptr; + } + + return GrSurfaceProxy::MakeWrapped(std::move(tex)); +#else if (willBeRT) { // We know anything we instantiate later from this deferred path will be // both texturable and renderable @@ -206,6 +221,7 @@ sk_sp<GrTextureProxy> GrSurfaceProxy::MakeDeferred(GrResourceProvider* resourceP } return sk_sp<GrTextureProxy>(new GrTextureProxy(copyDesc, fit, budgeted, nullptr, 0, flags)); +#endif } sk_sp<GrTextureProxy> GrSurfaceProxy::MakeDeferred(GrResourceProvider* resourceProvider, |