Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriate
Trying to be much more explicit about where we really mean sRGB as a format,
and where we mean gamma-correct, as in: "not legacy behavior". Most of the
changes to rendering behavior are dependent on the latter, so let's be precise.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884873006
Review URL: https://codereview.chromium.org/1884873006
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 60f905d..65b84dd 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -257,7 +257,7 @@
GrColor color,
const SkPaint& skPaint, const SkSurfaceProps& props,
const GrDistanceFieldAdjustTable* distanceAdjustTable,
- bool useSRGBDistanceTable,
+ bool useGammaCorrectDistanceTable,
GrBatchFontCache* cache) {
GrMaskFormat format = info.maskFormat();
GrColor subRunColor;
@@ -279,7 +279,8 @@
}
bool useBGR = SkPixelGeometryIsBGR(props.pixelGeometry());
batch = GrAtlasTextBatch::CreateDistanceField(glyphCount, cache,
- distanceAdjustTable, useSRGBDistanceTable,
+ distanceAdjustTable,
+ useGammaCorrectDistanceTable,
filteredColor, info.hasUseLCDText(), useBGR);
} else {
batch = GrAtlasTextBatch::CreateBitmap(format, glyphCount, cache);
@@ -311,13 +312,13 @@
continue;
}
- bool useSRGBDistanceTable = GrPixelConfigIsSRGB(dc->accessRenderTarget()->config()) &&
+ bool useGammaCorrectTable = GrPixelConfigIsSRGB(dc->accessRenderTarget()->config()) &&
!pipelineBuilder->getDisableOutputConversionToSRGB();
SkAutoTUnref<GrDrawBatch> batch(this->createBatch(info, glyphCount, run,
subRun, viewMatrix, x, y, color,
skPaint, props,
- distanceAdjustTable, useSRGBDistanceTable,
+ distanceAdjustTable, useGammaCorrectTable,
cache));
dc->drawBatch(pipelineBuilder, batch);
}