Allow implicit conversion from GrSamplerState::Filter to GrSamplerState

constexprify GrSamplerState

pass/return GrSamplerState by value (it's 3 bytes).

Remove unused function from GrTexturePriv

Change-Id: Iffecd941500acf5653f01cc88b42ff1d45678b54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263346
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index d26c4bf..ad629c5 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -224,7 +224,7 @@
 void GrTextureDomain::GLDomain::setData(const GrGLSLProgramDataManager& pdman,
                                         const GrTextureDomain& textureDomain,
                                         const GrSurfaceProxyView& view,
-                                        const GrSamplerState& state) {
+                                        GrSamplerState state) {
     // We want a hard transition from texture content to trans-black in nearest mode.
     bool filterDecal = state.filter() != GrSamplerState::Filter::kNearest;
     this->setData(pdman, textureDomain, view.proxy(), view.origin(), filterDecal);
@@ -514,7 +514,7 @@
         sk_sp<GrSurfaceProxy> proxy, const SkIRect& subset, const SkIPoint& deviceSpaceOffset)
         : INHERITED(kGrDeviceSpaceTextureDecalFragmentProcessor_ClassID,
                     kCompatibleWithCoverageAsAlpha_OptimizationFlag)
-        , fTextureSampler(proxy, GrSamplerState::ClampNearest())
+        , fTextureSampler(proxy, GrSamplerState::Filter::kNearest)
         , fTextureDomain(proxy.get(),
                          GrTextureDomain::MakeTexelDomain(subset, GrTextureDomain::kDecal_Mode),
                          GrTextureDomain::kDecal_Mode, GrTextureDomain::kDecal_Mode) {