Require explicit GrWrapCacheable specification in more places.
Make all wrapped resources be kUnbudgetedUncacheable except those
created by AHardwareBuffer image generators and as backings for promise
images.
Make all non-wrapped unbudgeted resources be kUnbudgetedUncacheable.
Update unit tests to mostly use GrWrapCacheable::kNo except where they
are testing the distinction.
Update unit tests for new expectations.
Bug: chromium:922851
Change-Id: I4d3bdaa161ffc76390f26334bcb7e2b47dd9319d
Reviewed-on: https://skia-review.googlesource.com/c/185004
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index b0ff64b..449fe60 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -947,7 +947,7 @@
ASSERT_SINGLE_OWNER_PRIV
sk_sp<GrSurfaceProxy> proxy = this->proxyProvider()->wrapBackendTexture(
- tex, origin, kBorrow_GrWrapOwnership, kRW_GrIOType);
+ tex, origin, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo, kRW_GrIOType);
if (!proxy) {
return nullptr;
}
@@ -964,8 +964,8 @@
ASSERT_SINGLE_OWNER_PRIV
SkASSERT(sampleCnt > 0);
- sk_sp<GrTextureProxy> proxy(
- this->proxyProvider()->wrapRenderableBackendTexture(tex, origin, sampleCnt));
+ sk_sp<GrTextureProxy> proxy(this->proxyProvider()->wrapRenderableBackendTexture(
+ tex, origin, sampleCnt, kBorrow_GrWrapOwnership, GrWrapCacheable::kNo));
if (!proxy) {
return nullptr;
}