diff options
author | Robert Phillips <robertphillips@google.com> | 2017-03-13 10:41:08 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-13 16:25:45 +0000 |
commit | 4f7062378eb7bdaf6ab19d178d54effd55adcc72 (patch) | |
tree | 6281a1c17598dc08f8895d76824544dca4c48e06 | |
parent | 841101d348bbfae2ca44e0a0f267c974d38c9891 (diff) |
Restore deferred GPU resources in Chrome
Change-Id: Ib52668b46e7d077175dcba12a3ccc8abc1f0c7a9
Reviewed-on: https://skia-review.googlesource.com/9552
Reviewed-by: Brian Salomon <bsalomon@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 | 4 |
3 files changed, 0 insertions, 22 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 31e0f1d1ca..5ed395beb6 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -22,8 +22,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 180a7f06b2..279eec2161 100644 --- a/src/gpu/GrSurfaceProxy.cpp +++ b/src/gpu/GrSurfaceProxy.cpp @@ -196,21 +196,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, 0)); - } else { - tex.reset(resourceProvider->createTexture(copyDesc, budgeted)); - } - - 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 @@ -219,7 +204,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(const GrCaps& caps, diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp index 299ed23841..612633c58c 100644 --- a/tests/ProxyRefTest.cpp +++ b/tests/ProxyRefTest.cpp @@ -46,8 +46,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, @@ -208,5 +206,3 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProxyRefTest, reporter, ctxInfo) { } } #endif - -#endif |