Simplify view getters on GrTextureProducer.

The only thing that affects the view returned is whether it ought to
be MIP mapped or not. So don't take a whole GrSamplerState.

The view() function won't ever change the colortype so just query
GrTextureProducer rather than having view() return a tuple.

The rest is transitively reaching through callers and callees of
GrTextureProducer::view() to only pass filter or GrMipMapped instead of
GrSamplerState. Also, some params that indicate whether MIPs are
requested are changed from bool to GrMipMapped. And some minor style
stuff (mainly de-yoda-ifying GrMipMapped checks, using
GrSurfaceProxyView operator bool()).

Change-Id: Ia184aa793cf51d42642ea3bb0521ce06da2efb10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274205
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrImageTextureMaker.cpp b/src/gpu/GrImageTextureMaker.cpp
index 892140f..97793e9 100644
--- a/src/gpu/GrImageTextureMaker.cpp
+++ b/src/gpu/GrImageTextureMaker.cpp
@@ -33,8 +33,8 @@
     GrMakeKeyFromImageID(&fOriginalKey, client->uniqueID(), SkIRect::MakeSize(this->dimensions()));
 }
 
-GrSurfaceProxyView GrImageTextureMaker::refOriginalTextureProxyView(bool willBeMipped) {
-    return fImage->lockTextureProxyView(this->context(), fOriginalKey, fCachingHint, willBeMipped);
+GrSurfaceProxyView GrImageTextureMaker::refOriginalTextureProxyView(GrMipMapped mipMapped) {
+    return fImage->lockTextureProxyView(this->context(), fOriginalKey, fCachingHint, mipMapped);
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
@@ -47,8 +47,8 @@
     GrMakeKeyFromImageID(&fOriginalKey, client->uniqueID(), SkIRect::MakeSize(this->dimensions()));
 }
 
-GrSurfaceProxyView GrYUVAImageTextureMaker::refOriginalTextureProxyView(bool willBeMipped) {
-    if (willBeMipped) {
+GrSurfaceProxyView GrYUVAImageTextureMaker::refOriginalTextureProxyView(GrMipMapped mipMapped) {
+    if (mipMapped == GrMipMapped::kYes) {
         return fImage->refMippedView(this->context());
     } else {
         if (const GrSurfaceProxyView* view = fImage->view(this->context())) {