Separate MIP filtering from min/mag filtering.

Does not add kNearest as a mip map mode yet.

Bug: skia:10344

Change-Id: Ida80cbf19e2b1eed5209d0680837fb45e54b4261
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index 6798b81..6510573 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -28,17 +28,17 @@
                                    SkAlphaType alphaType, uint32_t expectedPixelValues[]) {
     auto rtContext = GrRenderTargetContext::Make(
             context, colorType, nullptr, SkBackingFit::kExact, rectView.proxy()->dimensions());
-    for (auto filter : {GrSamplerState::Filter::kNearest,
-                        GrSamplerState::Filter::kLinear,
-                        GrSamplerState::Filter::kMipMap}) {
-        rtContext->clear(SkPMColor4f::FromBytes_RGBA(0xDDCCBBAA));
-        auto fp = GrTextureEffect::Make(rectView, alphaType, SkMatrix::I(), filter);
-        GrPaint paint;
-        paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
-        paint.setColorFragmentProcessor(std::move(fp));
-        rtContext->drawPaint(nullptr, std::move(paint), SkMatrix::I());
-        TestReadPixels(reporter, rtContext.get(), expectedPixelValues,
-                       "RectangleTexture-basic-draw");
+    for (auto filter : {GrSamplerState::Filter::kNearest, GrSamplerState::Filter::kLinear}) {
+        for (auto mm : {GrSamplerState::MipmapMode::kNone, GrSamplerState::MipmapMode::kLinear}) {
+            rtContext->clear(SkPMColor4f::FromBytes_RGBA(0xDDCCBBAA));
+            auto fp = GrTextureEffect::Make(rectView, alphaType, SkMatrix::I(), filter, mm);
+            GrPaint paint;
+            paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
+            paint.setColorFragmentProcessor(std::move(fp));
+            rtContext->drawPaint(nullptr, std::move(paint), SkMatrix::I());
+            TestReadPixels(reporter, rtContext.get(), expectedPixelValues,
+                           "RectangleTexture-basic-draw");
+        }
     }
 }