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/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index f7e337c..04b2138a 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -96,7 +96,7 @@
 
     fXferProcessor->setData(fProgramDataManager, xp, dstTexture, offset);
     if (dstTexture) {
-        fGpu->bindTexture(nextTexSamplerIdx++, GrSamplerParams::ClampNoFilter(), true,
+        fGpu->bindTexture(nextTexSamplerIdx++, GrSamplerState::ClampNearest(), true,
                           static_cast<GrGLTexture*>(dstTexture),
                           pipeline.dstTextureProxy()->origin());
     }
@@ -172,8 +172,8 @@
                                int* nextImageStorageIdx) {
     for (int i = 0; i < processor.numTextureSamplers(); ++i) {
         const GrResourceIOProcessor::TextureSampler& sampler = processor.textureSampler(i);
-        fGpu->bindTexture((*nextTexSamplerIdx)++, sampler.params(),
-                          allowSRGBInputs, static_cast<GrGLTexture*>(sampler.peekTexture()),
+        fGpu->bindTexture((*nextTexSamplerIdx)++, sampler.samplerState(), allowSRGBInputs,
+                          static_cast<GrGLTexture*>(sampler.peekTexture()),
                           sampler.proxy()->origin());
     }
     for (int i = 0; i < processor.numBuffers(); ++i) {
@@ -191,7 +191,7 @@
 void GrGLProgram::generateMipmaps(const GrResourceIOProcessor& processor, bool allowSRGBInputs) {
     for (int i = 0; i < processor.numTextureSamplers(); ++i) {
         const GrResourceIOProcessor::TextureSampler& sampler = processor.textureSampler(i);
-        fGpu->generateMipmaps(sampler.params(), allowSRGBInputs,
+        fGpu->generateMipmaps(sampler.samplerState(), allowSRGBInputs,
                               static_cast<GrGLTexture*>(sampler.peekTexture()),
                               sampler.proxy()->origin());
     }