Remove SK_DISABLE_DEFERRED_PROXIES define through code
Bug: skia: Change-Id: I03503dfee145f1cebf4ff73d5e5139ef17b42d85 Reviewed-on: https://skia-review.googlesource.com/103464 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
796cda11e4
commit
3f9797d2a5
@ -324,22 +324,6 @@ sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrSurfaceDesc& desc,
|
||||
this->caps()->getRenderTargetSampleCount(desc.fSampleCnt, desc.fConfig);
|
||||
}
|
||||
|
||||
#ifdef SK_DISABLE_DEFERRED_PROXIES
|
||||
// Temporarily force instantiation for crbug.com/769760 and crbug.com/769898
|
||||
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), copyDesc.fOrigin);
|
||||
#else
|
||||
if (copyDesc.fFlags & kRenderTarget_GrSurfaceFlag) {
|
||||
// We know anything we instantiate later from this deferred path will be
|
||||
// both texturable and renderable
|
||||
@ -348,7 +332,6 @@ sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrSurfaceDesc& desc,
|
||||
}
|
||||
|
||||
return sk_sp<GrTextureProxy>(new GrTextureProxy(copyDesc, fit, budgeted, nullptr, 0, flags));
|
||||
#endif
|
||||
}
|
||||
|
||||
sk_sp<GrTextureProxy> GrProxyProvider::createWrappedTextureProxy(
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "SkTypes.h"
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
#ifndef SK_DISABLE_DEFERRED_PROXIES
|
||||
#include "Test.h"
|
||||
|
||||
#include "GrContextPriv.h"
|
||||
@ -206,4 +205,3 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceAllocatorTest, reporter, ctxInfo) {
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -237,7 +237,6 @@ static void invalidation_test(GrContext* context, skiatest::Reporter* reporter)
|
||||
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
||||
}
|
||||
|
||||
#ifndef SK_DISABLE_DEFERRED_PROXIES
|
||||
// Test if invalidating unique ids prior to instantiating operates as expected
|
||||
static void invalidation_and_instantiation_test(GrContext* context, skiatest::Reporter* reporter) {
|
||||
GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider();
|
||||
@ -276,7 +275,6 @@ static void invalidation_and_instantiation_test(GrContext* context, skiatest::Re
|
||||
REPORTER_ASSERT(reporter, 0 == proxyProvider->numUniqueKeyProxies_TestOnly());
|
||||
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());
|
||||
}
|
||||
#endif
|
||||
|
||||
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TextureProxyTest, reporter, ctxInfo) {
|
||||
GrContext* context = ctxInfo.grContext();
|
||||
@ -302,9 +300,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TextureProxyTest, reporter, ctxInfo) {
|
||||
}
|
||||
|
||||
invalidation_test(context, reporter);
|
||||
#ifndef SK_DISABLE_DEFERRED_PROXIES
|
||||
invalidation_and_instantiation_test(context, reporter);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user