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>
This commit is contained in:
Robert Phillips 2017-03-13 10:41:08 -04:00 committed by Skia Commit-Bot
parent 841101d348
commit 4f7062378e
3 changed files with 0 additions and 22 deletions

View File

@ -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

View File

@ -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,

View File

@ -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