aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-11 09:09:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-12 11:14:31 +0000
commit123b7b8ebd2f8abb7e3b2d498f299ae281b24b74 (patch)
tree2cbf0655227e1d2da1dc87c002100ccbd302bc74 /src
parent8f30709e93ba377a0bf77f24aeae890d38b66e52 (diff)
Disable deferred proxies for Chrome branch
Chrome is branching again and Proxy instantiation is still occurring at a bad spot in Skia. Change-Id: I2f6bed7f1833737aa9bb7fd819ff108cffaeaf1d Reviewed-on: https://skia-review.googlesource.com/13133 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrSurfaceProxy.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index c243086f47..c9a36289d8 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -200,6 +200,21 @@ 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, 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
@@ -208,6 +223,7 @@ 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,