diff options
author | Robert Phillips <robertphillips@google.com> | 2017-04-18 08:10:22 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-18 13:28:05 +0000 |
commit | 7a17b2ffab593cad518a1a4dd372316c342f7b21 (patch) | |
tree | edeee86d919c90045e783bbec277e6738d56fce0 | |
parent | f41c22fca369af85b06ff34bae8a41c6672aff43 (diff) |
Re-enable deferred proxies in Chrome
Chrome has branched.
TBR=bsalomon@google.com
Change-Id: I578deafd63af9e86ff8f7cf8f8ccad6a901c1b21
Reviewed-on: https://skia-review.googlesource.com/13687
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
-rw-r--r-- | include/private/GrSurfaceProxy.h | 2 | ||||
-rw-r--r-- | src/gpu/GrSurfaceProxy.cpp | 16 | ||||
-rw-r--r-- | tests/ProxyRefTest.cpp | 3 |
3 files changed, 0 insertions, 21 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 4f0ab964d5..efcec137c4 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -23,8 +23,6 @@ class GrSurfaceProxyPriv; class GrTextureOpList; class GrTextureProxy; -//#define SK_DISABLE_DEFERRED_PROXIES 1 - // This class replicates the functionality GrIORef<GrSurface> but tracks the // utilitization for later resource allocation (for the deferred case) and // forwards on the utilization in the wrapped case diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp index 3ddee58308..f2a90ebab6 100644 --- a/src/gpu/GrSurfaceProxy.cpp +++ b/src/gpu/GrSurfaceProxy.cpp @@ -198,21 +198,6 @@ 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 @@ -221,7 +206,6 @@ 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, diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp index a18dd61f1c..d5569b41d1 100644 --- a/tests/ProxyRefTest.cpp +++ b/tests/ProxyRefTest.cpp @@ -47,8 +47,6 @@ int32_t GrIORefProxy::getPendingWriteCnt_TestOnly() const { return fPendingWrites; } -#ifndef SK_DISABLE_DEFERRED_PROXIES - static const int kWidthHeight = 128; static void check_refs(skiatest::Reporter* reporter, @@ -191,6 +189,5 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProxyRefTest, reporter, ctxInfo) { } } } -#endif #endif |