Simplify gamma-correctness for text rendering.

Just use the DC flag, independent of the destination pixel config or the
special output override flag (which is only to be used internally be
special effects that will never hit this code path.)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888473003

Review URL: https://codereview.chromium.org/1888473003
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 65b84dd..7d807da 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -312,13 +312,10 @@
             continue;
         }
 
-        bool useGammaCorrectTable = GrPixelConfigIsSRGB(dc->accessRenderTarget()->config()) &&
-                                    !pipelineBuilder->getDisableOutputConversionToSRGB();
-
         SkAutoTUnref<GrDrawBatch> batch(this->createBatch(info, glyphCount, run,
                                                           subRun, viewMatrix, x, y, color,
                                                           skPaint, props,
-                                                          distanceAdjustTable, useGammaCorrectTable,
+                                                          distanceAdjustTable, dc->isGammaCorrect(),
                                                           cache));
         dc->drawBatch(pipelineBuilder, batch);
     }
diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp
index 52960e8..22fd8a3 100644
--- a/src/gpu/text/GrAtlasTextContext.cpp
+++ b/src/gpu/text/GrAtlasTextContext.cpp
@@ -53,12 +53,10 @@
     return canonicalColor;
 }
 
-uint32_t GrAtlasTextContext::ComputeScalerContextFlags(GrDrawContext* dc, const GrPaint& grPaint) {
-    // If we're rendering to an sRGB render target, and we aren't forcing sRGB blending off,
-    // then we can disable the gamma hacks. Otherwise, leave them on. In either case, we still
-    // want the contrast boost:
-    if (GrPixelConfigIsSRGB(dc->accessRenderTarget()->config()) &&
-        !grPaint.getDisableOutputConversionToSRGB()) {
+uint32_t GrAtlasTextContext::ComputeScalerContextFlags(GrDrawContext* dc) {
+    // If we're doing gamma-correct rendering, then we can disable the gamma hacks.
+    // Otherwise, leave them on. In either case, we still want the contrast boost:
+    if (dc->isGammaCorrect()) {
         return SkPaint::kBoostContrast_ScalerContextFlag;
     } else {
         return SkPaint::kFakeGammaAndBoostContrast_ScalerContextFlags;
@@ -128,7 +126,7 @@
         return;
     }
 
-    uint32_t scalerContextFlags = ComputeScalerContextFlags(dc, grPaint);
+    uint32_t scalerContextFlags = ComputeScalerContextFlags(dc);
 
     if (cacheBlob) {
         if (cacheBlob->mustRegenerate(skPaint, grPaint.getColor(), blurRec, viewMatrix, x, y)) {
@@ -329,7 +327,7 @@
             CreateDrawTextBlob(context->getTextBlobCache(), context->getBatchFontCache(),
                                *context->caps()->shaderCaps(),
                                paint, skPaint,
-                               ComputeScalerContextFlags(dc, paint),
+                               ComputeScalerContextFlags(dc),
                                viewMatrix, props,
                                text, byteLength, x, y));
         blob->flushThrowaway(context, dc, props, fDistanceAdjustTable, skPaint, paint,
@@ -359,7 +357,7 @@
                                   context->getBatchFontCache(),
                                   *context->caps()->shaderCaps(),
                                   paint, skPaint,
-                                  ComputeScalerContextFlags(dc, paint),
+                                  ComputeScalerContextFlags(dc),
                                   viewMatrix, props,
                                   text, byteLength,
                                   pos, scalarsPerPosition,
diff --git a/src/gpu/text/GrAtlasTextContext.h b/src/gpu/text/GrAtlasTextContext.h
index 6d93783..928ce0a 100644
--- a/src/gpu/text/GrAtlasTextContext.h
+++ b/src/gpu/text/GrAtlasTextContext.h
@@ -53,7 +53,7 @@
     // sets up the descriptor on the blob and returns a detached cache.  Client must attach
     inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd);
     // Determines if we need to use fake gamma (and contrast boost):
-    inline static uint32_t ComputeScalerContextFlags(GrDrawContext*, const GrPaint&);
+    inline static uint32_t ComputeScalerContextFlags(GrDrawContext*);
     static void RegenerateTextBlob(GrAtlasTextBlob* bmp,
                                    GrBatchFontCache*,
                                    const GrShaderCaps&,