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:
parent
841101d348
commit
4f7062378e
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user