Swap GrSurfaceProxy over to being held via sk_sp
This CL:
replaces GrProxyRef with sk_sp
streamlines GrIORefProxy to be more like SkRefCntBase (i.e., move the fTarget pointer to GrSurfaceProxy)
Change-Id: I17d515100bb2d9104eed64269bd3bf75c1ebbbb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221997
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 520bf43..0570763 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -428,7 +428,7 @@
void GrFragmentProcessor::TextureSampler::reset(sk_sp<GrTextureProxy> proxy,
const GrSamplerState& samplerState) {
- fProxyRef.setProxy(std::move(proxy));
+ fProxy = std::move(proxy);
fSamplerState = samplerState;
fSamplerState.setFilterMode(SkTMin(samplerState.filter(), this->proxy()->highestFilterMode()));
}
@@ -436,7 +436,7 @@
void GrFragmentProcessor::TextureSampler::reset(sk_sp<GrTextureProxy> proxy,
GrSamplerState::Filter filterMode,
GrSamplerState::WrapMode wrapXAndY) {
- fProxyRef.setProxy(std::move(proxy));
+ fProxy = std::move(proxy);
filterMode = SkTMin(filterMode, this->proxy()->highestFilterMode());
fSamplerState = GrSamplerState(wrapXAndY, filterMode);
}