Re-enable deferred proxies in Chrome

Change-Id: I6dad0c1d3ff9f81e13625988b00c3f844128d7e7
Reviewed-on: https://skia-review.googlesource.com/19446
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2017-06-12 08:13:43 -04:00 committed by Skia Commit-Bot
parent c9c06d4586
commit db4062038c
5 changed files with 0 additions and 30 deletions

View File

@ -24,8 +24,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

@ -168,21 +168,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 = 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
@ -191,7 +176,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,

View File

@ -341,8 +341,6 @@ static const SkRect* no_inset(const RectInfo& enclosing,
insetAmount, halfFilterWidth, 0, name);
}
#ifndef SK_DISABLE_DEFERRED_PROXIES
static void proxy_test(skiatest::Reporter* reporter, GrResourceProvider* resourceProvider) {
GrTextureProducer_TestAccess::DomainMode actualMode, expectedMode;
SkRect actualDomainRect;
@ -446,5 +444,3 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DetermineDomainModeTest, reporter, ctxInfo) {
}
#endif
#endif

View File

@ -45,8 +45,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,5 +189,3 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProxyRefTest, reporter, ctxInfo) {
}
#endif
#endif

View File

@ -11,8 +11,6 @@
#if SK_SUPPORT_GPU
#ifndef SK_DISABLE_DEFERRED_PROXIES
#include "GrBackendSurface.h"
#include "GrRenderTargetPriv.h"
#include "GrRenderTargetProxy.h"
@ -311,5 +309,3 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ZeroSizedProxyTest, reporter, ctxInfo) {
}
#endif
#endif