Rework GrSamplerParams to be more compact and use its own wrap mode enum.

The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.

Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index b8497bd..0d71321 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -33,18 +33,18 @@
 }
 
 // This method parallels GrTextureProxy::highestFilterMode
-static inline GrSamplerParams::FilterMode highest_filter_mode(const GrGLTexture::IDDesc& idDesc,
-                                                              GrPixelConfig config) {
+static inline GrSamplerState::Filter highest_filter_mode(const GrGLTexture::IDDesc& idDesc,
+                                                         GrPixelConfig config) {
     if (GrPixelConfigIsSint(config)) {
         // Integer textures in GL can use GL_NEAREST_MIPMAP_NEAREST. This is a mode we don't support
         // and don't currently have a use for.
-        return GrSamplerParams::kNone_FilterMode;
+        return GrSamplerState::Filter::kNearest;
     }
     if (idDesc.fInfo.fTarget == GR_GL_TEXTURE_RECTANGLE ||
         idDesc.fInfo.fTarget == GR_GL_TEXTURE_EXTERNAL) {
-        return GrSamplerParams::kBilerp_FilterMode;
+        return GrSamplerState::Filter::kBilerp;
     }
-    return GrSamplerParams::kMipMap_FilterMode;
+    return GrSamplerState::Filter::kMipMap;
 }
 
 // Because this class is virtually derived from GrSurface we must explicitly call its constructor.