Lift TextureSampler's proxy to SurfaceProxy

Now that the UniformHandlers can accept SurfaceProxies directly, there's
no need to have the restricted type on TextureSampler anymore. This will
make them one step closer to compatibility with GrSurfaceProxyView.

While making these changes, several effects performed their own source
coord normalization by peeking the texture. I updated these to just
use the proxy's backing store dimensions.

Bug: skia:9556
Change-Id: I97183e8453b7a3db86cd90d614c8c959b3707abb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255978
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 1e1f2e4..933bc01 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -418,14 +418,17 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-GrFragmentProcessor::TextureSampler::TextureSampler(sk_sp<GrTextureProxy> proxy,
+GrFragmentProcessor::TextureSampler::TextureSampler(sk_sp<GrSurfaceProxy> proxy,
                                                     const GrSamplerState& samplerState) {
     this->reset(std::move(proxy), samplerState);
 }
 
-void GrFragmentProcessor::TextureSampler::reset(sk_sp<GrTextureProxy> proxy,
+void GrFragmentProcessor::TextureSampler::reset(sk_sp<GrSurfaceProxy> proxy,
                                                 const GrSamplerState& samplerState) {
+    SkASSERT(proxy->asTextureProxy());
     fProxy = std::move(proxy);
     fSamplerState = samplerState;
-    fSamplerState.setFilterMode(SkTMin(samplerState.filter(), this->proxy()->highestFilterMode()));
+    fSamplerState.setFilterMode(
+            SkTMin(samplerState.filter(),
+                   GrTextureProxy::HighestFilterMode(fProxy->backendFormat().textureType())));
 }