Roll Skia from 994a571fc79a to 48bfa488091a (3 revisions)

https://skia.googlesource.com/skia.git/+log/994a571fc79a..48bfa488091a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://skia-autoroll.corp.goog/r/android-master-autoroll
Please CC stani@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Test: Presubmit checks will test this change.
Exempt-From-Owner-Approval: The autoroll bot does not require owner approval.
Change-Id: Ia9473231797408abf0e36a01baac4398a71d78d8
diff --git a/Android.bp b/Android.bp
index b733c6c..4d76351 100644
--- a/Android.bp
+++ b/Android.bp
@@ -853,7 +853,7 @@
           "src/gpu/text/GrAtlasManager.cpp",
           "src/gpu/text/GrDistanceFieldAdjustTable.cpp",
           "src/gpu/text/GrSDFMaskFilter.cpp",
-          "src/gpu/text/GrSDFTControl.cpp",
+          "src/gpu/text/GrSDFTOptions.cpp",
           "src/gpu/text/GrStrikeCache.cpp",
           "src/gpu/text/GrTextBlob.cpp",
           "src/gpu/text/GrTextBlobCache.cpp",
diff --git a/METADATA b/METADATA
index e84678f..e5ff1b0 100644
--- a/METADATA
+++ b/METADATA
@@ -9,7 +9,7 @@
     type: GIT
     value: "https://skia.googlesource.com/skia"
   }
-  version: "994a571fc79af4524473663210fdb1c7fddf5781"
+  version: "48bfa488091a64ca8cdba090635a9d7871245378"
   license_type: RECIPROCAL
   last_upgrade_date {
     year: 2021
diff --git a/bench/GlyphQuadFillBench.cpp b/bench/GlyphQuadFillBench.cpp
index 3a82bfb..25c8881 100644
--- a/bench/GlyphQuadFillBench.cpp
+++ b/bench/GlyphQuadFillBench.cpp
@@ -49,14 +49,14 @@
         SkGlyphRunListPainter painter{props, kUnknown_SkColorType,
                                       colorSpace.get(), SkStrikeCache::GlobalStrikeCache()};
 
-        GrSDFTControl control{false, props.isUseDeviceIndependentFonts(), 256, 256};
+        GrSDFTOptions options{false, props.isUseDeviceIndependentFonts(), 256, 256};
         const SkPoint drawOrigin = glyphRunList.origin();
         const SkPaint& drawPaint = glyphRunList.paint();
 
         SkMatrix drawMatrix = view;
         drawMatrix.preTranslate(drawOrigin.x(), drawOrigin.y());
         for (auto& glyphRun : glyphRunList) {
-            painter.processGlyphRun(glyphRun, drawMatrix, drawPaint, control, fBlob.get());
+            painter.processGlyphRun(glyphRun, drawMatrix, drawPaint, options, fBlob.get());
         }
 
         SkASSERT(!fBlob->subRunList().isEmpty());
diff --git a/gn/flutter_defines.gni b/gn/flutter_defines.gni
index 099a114..2c7e175 100644
--- a/gn/flutter_defines.gni
+++ b/gn/flutter_defines.gni
@@ -20,9 +20,6 @@
   "SK_DISABLE_LEGACY_SHADERCONTEXT",
   "SK_DISABLE_LOWP_RASTER_PIPELINE",
   "SK_FORCE_RASTER_PIPELINE_BLITTER",
-
-  # Signal that we are building for Flutter.
-  "SK_BUILD_FOR_FLUTTER",
 ]
 
 if (!is_fuchsia) {
diff --git a/gn/gpu.gni b/gn/gpu.gni
index 36845cb..55c7c78 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -499,8 +499,8 @@
   "$_src/gpu/text/GrDistanceFieldAdjustTable.h",
   "$_src/gpu/text/GrSDFMaskFilter.cpp",
   "$_src/gpu/text/GrSDFMaskFilter.h",
-  "$_src/gpu/text/GrSDFTControl.cpp",
-  "$_src/gpu/text/GrSDFTControl.h",
+  "$_src/gpu/text/GrSDFTOptions.cpp",
+  "$_src/gpu/text/GrSDFTOptions.h",
   "$_src/gpu/text/GrStrikeCache.cpp",
   "$_src/gpu/text/GrStrikeCache.h",
   "$_src/gpu/text/GrTextBlob.cpp",
diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp
index 3c255a2..64ae1ca 100644
--- a/src/core/SkGlyphRunPainter.cpp
+++ b/src/core/SkGlyphRunPainter.cpp
@@ -16,7 +16,7 @@
 #include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/ops/GrAtlasTextOp.h"
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 #include "src/gpu/text/GrTextBlobCache.h"
 #endif
 
@@ -48,7 +48,7 @@
         ,  fColorType{colorType}, fScalerContextFlags{flags}
         ,  fStrikeCache{strikeCache} {}
 
-// TODO: unify with code in GrSDFTControl.cpp
+// TODO: unify with code in GrSDFTOptions.cpp
 static SkScalerContextFlags compute_scaler_context_flags(const SkColorSpace* cs) {
     // If we're doing linear blending, then we can disable the gamma hacks.
     // Otherwise, leave them on. In either case, we still want the contrast boost:
@@ -140,18 +140,18 @@
 void SkGlyphRunListPainter::processGlyphRun(const SkGlyphRun& glyphRun,
                                             const SkMatrix& drawMatrix,
                                             const SkPaint& runPaint,
-                                            const GrSDFTControl& control,
+                                            const GrSDFTOptions& options,
                                             SkGlyphRunPainterInterface* process) {
     ScopedBuffers _ = this->ensureBuffers(glyphRun);
     fRejects.setSource(glyphRun.source());
     const SkFont& runFont = glyphRun.font();
 
-    GrSDFTControl::DrawingType drawingType = control.drawingType(runFont, runPaint, drawMatrix);
+    GrSDFTOptions::DrawingType drawingType = options.drawingType(runFont, runPaint, drawMatrix);
 
-    if (drawingType == GrSDFTControl::kSDFT) {
+    if (drawingType == GrSDFTOptions::kSDFT) {
         // Process SDFT - This should be the .009% case.
         const auto& [strikeSpec, minScale, maxScale] =
-                SkStrikeSpec::MakeSDFT(runFont, runPaint, fDeviceProps, drawMatrix, control);
+                SkStrikeSpec::MakeSDFT(runFont, runPaint, fDeviceProps, drawMatrix, options);
 
         if (!strikeSpec.isEmpty()) {
             SkScopedStrikeForGPU strike = strikeSpec.findOrCreateScopedStrike(fStrikeCache);
@@ -169,7 +169,7 @@
         }
     }
 
-    if (drawingType != GrSDFTControl::kPath && !fRejects.source().empty()) {
+    if (drawingType != GrSDFTOptions::kPath && !fRejects.source().empty()) {
         // Process masks including ARGB - this should be the 99.99% case.
 
         SkStrikeSpec strikeSpec = SkStrikeSpec::MakeMask(
diff --git a/src/core/SkGlyphRunPainter.h b/src/core/SkGlyphRunPainter.h
index cea4485..29cb493 100644
--- a/src/core/SkGlyphRunPainter.h
+++ b/src/core/SkGlyphRunPainter.h
@@ -16,7 +16,7 @@
 #include "src/core/SkTextBlobPriv.h"
 
 #if SK_SUPPORT_GPU
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 class GrColorInfo;
 class GrSurfaceDrawContext;
 #endif
@@ -86,7 +86,7 @@
     void processGlyphRun(const SkGlyphRun& glyphRun,
                          const SkMatrix& drawMatrix,
                          const SkPaint& drawPaint,
-                         const GrSDFTControl& control,
+                         const GrSDFTOptions& options,
                          SkGlyphRunPainterInterface* process);
 #endif  // SK_SUPPORT_GPU
 
diff --git a/src/core/SkRemoteGlyphCache.cpp b/src/core/SkRemoteGlyphCache.cpp
index c72a091..db49175 100644
--- a/src/core/SkRemoteGlyphCache.cpp
+++ b/src/core/SkRemoteGlyphCache.cpp
@@ -33,7 +33,7 @@
 #if SK_SUPPORT_GPU
 #include "include/gpu/GrContextOptions.h"
 #include "src/gpu/GrDrawOpAtlas.h"
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 #endif
 
 static SkDescriptor* auto_descriptor_from_desc(const SkDescriptor* source_desc,
@@ -818,8 +818,8 @@
     void drawGlyphRunList(const SkGlyphRunList& glyphRunList) override {
         #if SK_SUPPORT_GPU
         GrContextOptions ctxOptions;
-        GrSDFTControl control =
-                GrSDFTControl{fDFTSupport,
+        GrSDFTOptions options =
+                GrSDFTOptions{fDFTSupport,
                               this->surfaceProps().isUseDeviceIndependentFonts(),
                               ctxOptions.fMinDistanceFieldFontSize,
                               ctxOptions.fGlyphsAsPathsFontSize};
@@ -830,7 +830,7 @@
             fPainter.processGlyphRun(glyphRun,
                                      drawMatrix,
                                      glyphRunList.paint(),
-                                     control,
+                                     options,
                                      nullptr);
         }
         #endif  // SK_SUPPORT_GPU
diff --git a/src/core/SkStrikeSpec.cpp b/src/core/SkStrikeSpec.cpp
index ccaf308..597d084 100644
--- a/src/core/SkStrikeSpec.cpp
+++ b/src/core/SkStrikeSpec.cpp
@@ -15,7 +15,7 @@
 
 #if SK_SUPPORT_GPU
 #include "src/gpu/text/GrSDFMaskFilter.h"
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 #include "src/gpu/text/GrStrikeCache.h"
 #endif
 
@@ -163,18 +163,18 @@
 std::tuple<SkStrikeSpec, SkScalar, SkScalar>
 SkStrikeSpec::MakeSDFT(const SkFont& font, const SkPaint& paint,
                        const SkSurfaceProps& surfaceProps, const SkMatrix& deviceMatrix,
-                       const GrSDFTControl& control) {
+                       const GrSDFTOptions& options) {
     SkPaint dfPaint{paint};
     dfPaint.setMaskFilter(GrSDFMaskFilter::Make());
     SkScalar strikeToSourceRatio;
-    SkFont dfFont = control.getSDFFont(font, deviceMatrix, &strikeToSourceRatio);
+    SkFont dfFont = options.getSDFFont(font, deviceMatrix, &strikeToSourceRatio);
 
     // Fake-gamma and subpixel antialiasing are applied in the shader, so we ignore the
     // passed-in scaler context flags. (It's only used when we fall-back to bitmap text).
     SkScalerContextFlags flags = SkScalerContextFlags::kNone;
 
     SkScalar minScale, maxScale;
-    std::tie(minScale, maxScale) = control.computeSDFMinMaxScale(font.getSize(), deviceMatrix);
+    std::tie(minScale, maxScale) = options.computeSDFMinMaxScale(font.getSize(), deviceMatrix);
 
     SkStrikeSpec strikeSpec(dfFont, dfPaint, surfaceProps, flags,
                             SkMatrix::I(), strikeToSourceRatio);
diff --git a/src/core/SkStrikeSpec.h b/src/core/SkStrikeSpec.h
index 4bc020f..82133d9 100644
--- a/src/core/SkStrikeSpec.h
+++ b/src/core/SkStrikeSpec.h
@@ -13,7 +13,7 @@
 #include "src/core/SkStrikeForGPU.h"
 
 #if SK_SUPPORT_GPU
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 class GrStrikeCache;
 class GrTextStrike;
 #endif
@@ -75,7 +75,7 @@
             const SkPaint& paint,
             const SkSurfaceProps& surfaceProps,
             const SkMatrix& deviceMatrix,
-            const GrSDFTControl& control);
+            const GrSDFTOptions& options);
 
     sk_sp<GrTextStrike> findOrCreateGrStrike(GrStrikeCache* cache) const;
 #endif
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index cc4f761..2b48ba2 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -44,7 +44,7 @@
 #include "src/gpu/GrWaitRenderTask.h"
 #include "src/gpu/GrWritePixelsRenderTask.h"
 #include "src/gpu/ccpr/GrCoverageCountingPathRenderer.h"
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 #include "src/image/SkSurface_Gpu.h"
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/GrRecordingContextPriv.cpp b/src/gpu/GrRecordingContextPriv.cpp
index 4c41abb..1bf3058 100644
--- a/src/gpu/GrRecordingContextPriv.cpp
+++ b/src/gpu/GrRecordingContextPriv.cpp
@@ -14,8 +14,8 @@
     fContext->drawingManager()->moveRenderTasksToDDL(ddl);
 }
 
-GrSDFTControl GrRecordingContextPriv::getSDFTControl(bool useSDFTForSmallText) const {
-    return GrSDFTControl{
+GrSDFTOptions GrRecordingContextPriv::getSDFTOptions(bool useSDFTForSmallText) const {
+    return GrSDFTOptions{
             this->caps()->shaderCaps()->supportsDistanceFieldText(),
             useSDFTForSmallText,
             this->options().fMinDistanceFieldFontSize,
diff --git a/src/gpu/GrRecordingContextPriv.h b/src/gpu/GrRecordingContextPriv.h
index 5380735..5a6b88b 100644
--- a/src/gpu/GrRecordingContextPriv.h
+++ b/src/gpu/GrRecordingContextPriv.h
@@ -9,7 +9,7 @@
 #define GrRecordingContextPriv_DEFINED
 
 #include "include/gpu/GrRecordingContext.h"
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 
 class SkDeferredDisplayList;
 
@@ -102,7 +102,7 @@
         return &fContext->fStats;
     }
 
-    GrSDFTControl getSDFTControl(bool useSDFTForSmallText) const;
+    GrSDFTOptions getSDFTOptions(bool useSDFTForSmallText) const;
 
     /**
      * Create a GrRecordingContext without a resource cache
diff --git a/src/gpu/GrSurfaceDrawContext.cpp b/src/gpu/GrSurfaceDrawContext.cpp
index e467e57..2f2fdc4 100644
--- a/src/gpu/GrSurfaceDrawContext.cpp
+++ b/src/gpu/GrSurfaceDrawContext.cpp
@@ -67,7 +67,7 @@
 #include "src/gpu/ops/GrStencilPathOp.h"
 #include "src/gpu/ops/GrStrokeRectOp.h"
 #include "src/gpu/ops/GrTextureOp.h"
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 #include "src/gpu/text/GrTextBlobCache.h"
 
 #define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == this->drawingManager()->getContext())
@@ -364,8 +364,8 @@
         return;
     }
 
-    GrSDFTControl control =
-            this->recordingContext()->priv().getSDFTControl(
+    GrSDFTOptions options =
+            this->recordingContext()->priv().getSDFTOptions(
                     this->surfaceProps().isUseDeviceIndependentFonts());
 
     GrTextBlobCache* textBlobCache = fContext->priv().getTextBlobCache();
@@ -419,10 +419,10 @@
         // Calculate the set of drawing types.
         key.fSetOfDrawingTypes = 0;
         for (auto& run : glyphRunList) {
-            key.fSetOfDrawingTypes |= control.drawingType(run.font(), drawPaint, drawMatrix);
+            key.fSetOfDrawingTypes |= options.drawingType(run.font(), drawPaint, drawMatrix);
         }
 
-        if (key.fSetOfDrawingTypes & GrSDFTControl::kDirect) {
+        if (key.fSetOfDrawingTypes & GrSDFTOptions::kDirect) {
             // Store the fractional offset of the position. We know that the matrix can't be
             // perspective at this point.
             SkPoint mappedOrigin = drawMatrix.mapOrigin();
@@ -453,7 +453,7 @@
                           glyphRunList,
                           drawMatrix,
                           drawPaint,
-                          control);
+                          options);
 
         if (canCache) {
             blob->addKey(key);
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index f98ecb7..403f8af 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -31,24 +31,7 @@
 #include "src/gpu/GrDrawOpTest.h"
 #endif
 
-#if !defined(GR_OP_ALLOCATE_USE_POOL) && defined(GR_HAS_THREAD_LOCAL)
-static thread_local std::unique_ptr<char> gGrAtlasTextOpCache = nullptr;
-void* GrAtlasTextOp::operator new(size_t s) {
-    if (gGrAtlasTextOpCache != nullptr) {
-        return gGrAtlasTextOpCache.release();
-    } else {
-        return ::operator new(s);
-    }
-}
-
-void GrAtlasTextOp::operator delete(void* b) noexcept {
-    if (gGrAtlasTextOpCache == nullptr) {
-        gGrAtlasTextOpCache.reset(static_cast<char*>(b));
-    } else {
-        ::operator delete(b);
-    }
-}
-#endif
+///////////////////////////////////////////////////////////////////////////////////////////////////
 
 GrAtlasTextOp::GrAtlasTextOp(MaskType maskType,
                              bool needsTransform,
@@ -500,8 +483,8 @@
     }
 
     auto rContext = rtc->recordingContext();
-    GrSDFTControl control =
-            rContext->priv().getSDFTControl(rtc->surfaceProps().isUseDeviceIndependentFonts());
+    GrSDFTOptions SDFOptions =
+            rContext->priv().getSDFTOptions(rtc->surfaceProps().isUseDeviceIndependentFonts());
 
     sk_sp<GrTextBlob> blob = GrTextBlob::Make(glyphRunList, drawMatrix);
     SkGlyphRunListPainter* painter = rtc->glyphRunPainter();
@@ -509,7 +492,7 @@
             *glyphRunList.begin(),
             drawMatrix,
             glyphRunList.paint(),
-            control,
+            SDFOptions,
             blob.get());
     if (blob->subRunList().isEmpty()) {
         return nullptr;
diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h
index 30eacd6..ad47337 100644
--- a/src/gpu/ops/GrAtlasTextOp.h
+++ b/src/gpu/ops/GrAtlasTextOp.h
@@ -13,12 +13,6 @@
 #include "src/gpu/ops/GrMeshDrawOp.h"
 #include "src/gpu/text/GrTextBlob.h"
 
-#if !defined(SK_BUILD_FOR_FLUTTER) && \
-    (!defined(SK_BUILD_FOR_IOS) || \
-        (defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_9_0))
-    #define GR_HAS_THREAD_LOCAL
-#endif
-
 class GrRecordingContext;
 
 class GrAtlasTextOp final : public GrMeshDrawOp {
@@ -31,11 +25,6 @@
         }
     }
 
-#if !defined(GR_OP_ALLOCATE_USE_POOL) && defined(GR_HAS_THREAD_LOCAL)
-    void* operator new(size_t s);
-    void operator delete(void* b) noexcept;
-#endif
-
     static const int kVerticesPerGlyph = GrAtlasSubRun::kVerticesPerGlyph;
     static const int kIndicesPerGlyph = 6;
 
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 64c3f06..93c5de8 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -82,14 +82,7 @@
 
     template<typename Op, typename... Args>
     static Owner Make(GrRecordingContext* context, Args&&... args) {
-        #if defined(GR_OP_ALLOCATE_USE_POOL)
-            GrMemoryPool* pool = context->priv().opMemoryPool();
-            void* mem = pool->allocate(sizeof(Op));
-            GrOp* op = new (mem) Op(std::forward<Args>(args)...);
-            return Owner{op, pool};
-        #else
-            return Owner{new Op(std::forward<Args>(args)...)};
-        #endif
+        return MakeWithExtraMemory<Op>(context, 0, std::forward<Args>(args)...);
     }
 
     template<typename Op, typename... Args>
@@ -169,17 +162,25 @@
         return SkToBool(fBoundsFlags & kZeroArea_BoundsFlag);
     }
 
-    #if defined(GR_OP_ALLOCATE_USE_POOL) && defined(SK_DEBUG)
-        // All GrOp-derived classes should be allocated in and deleted from a GrMemoryPool
-        void* operator new(size_t size);
-        void operator delete(void* target);
+    #if defined(GR_OP_ALLOCATE_USE_POOL)
+        #if defined(SK_DEBUG)
+            // All GrOp-derived classes should be allocated in and deleted from a GrMemoryPool
+            void* operator new(size_t size);
+            void operator delete(void* target);
 
-        void* operator new(size_t size, void* placement) {
-            return ::operator new(size, placement);
-        }
-        void operator delete(void* target, void* placement) {
-            ::operator delete(target, placement);
-        }
+            void* operator new(size_t size, void* placement) {
+                return ::operator new(size, placement);
+            }
+            void operator delete(void* target, void* placement) {
+                ::operator delete(target, placement);
+            }
+        #endif
+    #else
+        // GrOps are allocated using ::operator new in the GrMemoryPool. Doing this style of memory
+        // allocation defeats the delete with size optimization.
+        void* operator new(size_t) { SK_ABORT("All GrOps are created by placement new."); }
+        void* operator new(size_t, void* p) { return p; }
+        void operator delete(void* p) { ::operator delete(p); }
     #endif
 
     /**
diff --git a/src/gpu/text/GrSDFTControl.cpp b/src/gpu/text/GrSDFTOptions.cpp
similarity index 94%
rename from src/gpu/text/GrSDFTControl.cpp
rename to src/gpu/text/GrSDFTOptions.cpp
index 03eb39c..e667bc9 100644
--- a/src/gpu/text/GrSDFTControl.cpp
+++ b/src/gpu/text/GrSDFTOptions.cpp
@@ -5,7 +5,7 @@
  * found in the LICENSE file.
  */
 
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 
 #include "include/core/SkFont.h"
 #include "include/core/SkGraphics.h"
@@ -19,7 +19,7 @@
 
 // DF sizes and thresholds for usage of the small and medium sizes. For example, above
 // kSmallDFFontLimit we will use the medium size. The large size is used up until the size at
-// which we switch over to drawing as paths as controlled by Control.
+// which we switch over to drawing as paths as controlled by Options.
 static const int kSmallDFFontSize = 32;
 static const int kSmallDFFontLimit = 32;
 static const int kMediumDFFontSize = 72;
@@ -30,14 +30,14 @@
 static const int kExtraLargeDFFontSize = 256;
 #endif
 
-SkScalar GrSDFTControl::MinSDFTRange(bool useSDFTForSmallText, SkScalar min) {
+SkScalar GrSDFTOptions::MinSDFTRange(bool useSDFTForSmallText, SkScalar min) {
     if (!useSDFTForSmallText) {
         return kLargeDFFontSize;
     }
     return min;
 }
 
-GrSDFTControl::GrSDFTControl(
+GrSDFTOptions::GrSDFTOptions(
         bool ableToUseSDFT, bool useSDFTForSmallText, SkScalar min, SkScalar max)
         : fMinDistanceFieldFontSize{MinSDFTRange(useSDFTForSmallText, min)}
         , fMaxDistanceFieldFontSize{max}
@@ -45,7 +45,7 @@
     SkASSERT_RELEASE(0 < min && min <= max);
 }
 
-auto GrSDFTControl::drawingType(
+auto GrSDFTOptions::drawingType(
         const SkFont& font, const SkPaint& paint, const SkMatrix& viewMatrix) const -> DrawingType {
 
     // Use paths as the first choice for hairlines and perspective.
@@ -95,7 +95,7 @@
     return scaledTextSize;
 }
 
-SkFont GrSDFTControl::getSDFFont(const SkFont& font,
+SkFont GrSDFTOptions::getSDFFont(const SkFont& font,
                                  const SkMatrix& viewMatrix,
                                  SkScalar* textRatio) const {
     SkScalar textSize = font.getSize();
@@ -133,7 +133,7 @@
     return dfFont;
 }
 
-std::pair<SkScalar, SkScalar> GrSDFTControl::computeSDFMinMaxScale(
+std::pair<SkScalar, SkScalar> GrSDFTOptions::computeSDFMinMaxScale(
         SkScalar textSize, const SkMatrix& viewMatrix) const {
 
     SkScalar scaledTextSize = scaled_text_size(textSize, viewMatrix);
diff --git a/src/gpu/text/GrSDFTControl.h b/src/gpu/text/GrSDFTOptions.h
similarity index 86%
rename from src/gpu/text/GrSDFTControl.h
rename to src/gpu/text/GrSDFTOptions.h
index 59ffc7b..9f1bc05 100644
--- a/src/gpu/text/GrSDFTControl.h
+++ b/src/gpu/text/GrSDFTOptions.h
@@ -5,8 +5,8 @@
  * found in the LICENSE file.
  */
 
-#ifndef GrSDFTControl_DEFINED
-#define GrSDFTControl_DEFINED
+#ifndef GrSDFTOptions_DEFINED
+#define GrSDFTOptions_DEFINED
 
 #include "include/core/SkFont.h"
 #include "include/core/SkScalar.h"
@@ -14,9 +14,9 @@
 class SkMatrix;
 class SkSurfaceProps;
 
-class GrSDFTControl {
+class GrSDFTOptions {
 public:
-    GrSDFTControl(bool ableToUseSDFT, bool useSDFTForSmallText, SkScalar min, SkScalar max);
+    GrSDFTOptions(bool ableToUseSDFT, bool useSDFTForSmallText, SkScalar min, SkScalar max);
 
     enum DrawingType : uint8_t {
         kDirect = 1,
@@ -45,4 +45,4 @@
     const bool fAbleToUseSDFT;
 };
 
-#endif  // GrSDFTControl_DEFINED
+#endif  // GrSDFTOptions_DEFINED
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index bcb80a6..16ab963 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -1365,7 +1365,7 @@
         return false;
     }
 
-    if (fSetOfDrawingTypes & GrSDFTControl::kDirect) {
+    if (fSetOfDrawingTypes & GrSDFTOptions::kDirect) {
         auto [compatible, _] = check_integer_translate(fDrawMatrix, that.fDrawMatrix);
         return compatible;
     }
@@ -1487,12 +1487,12 @@
                              const SkGlyphRunList& glyphRunList,
                              const SkMatrix& drawMatrix,
                              const SkPaint& runPaint,
-                             const GrSDFTControl& control) {
+                             const GrSDFTOptions& options) {
     for (auto& glyphRun : glyphRunList) {
         painter->processGlyphRun(glyphRun,
                                  drawMatrix,
                                  runPaint,
-                                 control,
+                                 options,
                                  this);
     }
 }
diff --git a/src/gpu/text/GrTextBlob.h b/src/gpu/text/GrTextBlob.h
index af4b4b9..497b246 100644
--- a/src/gpu/text/GrTextBlob.h
+++ b/src/gpu/text/GrTextBlob.h
@@ -409,7 +409,7 @@
             const SkGlyphRunList& glyphRunList,
             const SkMatrix& drawMatrix,
             const SkPaint& runPaint,
-            const GrSDFTControl& control);
+            const GrSDFTOptions& options);
 
     static const Key& GetKey(const GrTextBlob& blob);
     static uint32_t Hash(const Key& key);
diff --git a/tests/SkRemoteGlyphCacheTest.cpp b/tests/SkRemoteGlyphCacheTest.cpp
index 85b495e..4fa0987 100644
--- a/tests/SkRemoteGlyphCacheTest.cpp
+++ b/tests/SkRemoteGlyphCacheTest.cpp
@@ -20,7 +20,7 @@
 #include "src/core/SkTypeface_remote.h"
 #include "src/gpu/GrDirectContextPriv.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/text/GrSDFTControl.h"
+#include "src/gpu/text/GrSDFTOptions.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
@@ -683,8 +683,8 @@
 
     // A scale transform forces fallback to dft.
     SkMatrix matrix = SkMatrix::Scale(16, 16);
-    GrSDFTControl control = direct->priv().asRecordingContext()->priv().getSDFTControl(true);
-    REPORTER_ASSERT(reporter, control.drawingType(font, paint, matrix) == GrSDFTControl::kSDFT);
+    GrSDFTOptions options = direct->priv().asRecordingContext()->priv().getSDFTOptions(true);
+    REPORTER_ASSERT(reporter, options.drawingType(font, paint, matrix) == GrSDFTOptions::kSDFT);
 
     // Server.
     auto serverTf = SkTypeface::MakeFromName("monospace", SkFontStyle());