aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-12 08:13:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-12 15:59:47 +0000
commitdb4062038cc0e1b78795b840fa82a4be5705e0e2 (patch)
tree7f7b9c08376312141151b4226ff8fefc7cba1d12
parentc9c06d45863e64ae99ef54c8c56014c855f1ca65 (diff)
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>
-rw-r--r--include/private/GrSurfaceProxy.h2
-rw-r--r--src/gpu/GrSurfaceProxy.cpp16
-rw-r--r--tests/DetermineDomainModeTest.cpp4
-rw-r--r--tests/ProxyRefTest.cpp4
-rw-r--r--tests/ProxyTest.cpp4
5 files changed, 0 insertions, 30 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index bded2c1be6..091fcc8887 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -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
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 53529c2e3b..66deb77651 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -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,
diff --git a/tests/DetermineDomainModeTest.cpp b/tests/DetermineDomainModeTest.cpp
index 1ce38d34b9..add746fec5 100644
--- a/tests/DetermineDomainModeTest.cpp
+++ b/tests/DetermineDomainModeTest.cpp
@@ -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
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index 0775fde3e8..cd07e186c8 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -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
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index 75df5aaa3b..114f5bb639 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -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