aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-08 15:18:47 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-08 15:18:53 +0000
commit05814de6ba5087ad71f189d6413246ef1d518e4b (patch)
tree3c1595c0def853196f7bcad34b8f00a5aad8e5be /src
parent9bb75afed422f087ee68a53956c46b83c0aade34 (diff)
Revert "Re-enable deferred proxies in Chrome"
This reverts commit 555c49c3479edf1692579c06a5c13c39d3741692. Reason for revert: layout tests Original change's description: > Re-enable deferred proxies in Chrome > > Now that https://skia-review.googlesource.com/c/14605/ (Allow TextureSamplers to have null GrTexture pointer) has landed we should be able to re-enable deferred proxies in Chrome. > > Bug: 715488 > Change-Id: Ibd38e5ddf0558b94f09e29f17837e6abfd22fa34 > Reviewed-on: https://skia-review.googlesource.com/15252 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie90e64a2e4d5efc4b6909a04f8a862dd3a708d97 Reviewed-on: https://skia-review.googlesource.com/15809 Reviewed-by: Robert Phillips <robertphillips@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 fd9a9c443e..76523ce03a 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -198,6 +198,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
@@ -206,6 +221,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,