make options robust
Options used to rely on an external call to SanitizeOptions to
ensure they were correct. Now that defaults are set directly,
make sure that the values coming in make sense.
Change-Id: If6cfc027722b6a7717a920b482ec5be8f7526367
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296040
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 85cc6cc..c900866 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -561,11 +561,7 @@
auto glyphRunList = builder.useGlyphRunList();
const GrRecordingContextPriv& contextPriv = rtc->fContext->priv();
- GrTextContext::Options SDFOptions = {
- contextPriv.options().fMinDistanceFieldFontSize,
- contextPriv.options().fGlyphsAsPathsFontSize
- };
- GrTextContext::SanitizeOptions(&SDFOptions);
+ GrTextContext::Options SDFOptions = rtc->fContext->priv().SDFTOptions();
if (glyphRunList.empty()) {
return nullptr;