Add GrColorSpaceInfo and use in place of GrRenderTargetContext in paint conversion.
This moves us closer to making GrAtlasTextContext and related classes usable without a GrRenderTargetContext.
Change-Id: Ife52d69a3f925e23da88043acb4d8dc9f672a025
Reviewed-on: https://skia-review.googlesource.com/63304
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 339ae6d..be83dc1 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -274,8 +274,8 @@
bool useBGR = SkPixelGeometryIsBGR(props.pixelGeometry());
op = GrAtlasTextOp::MakeDistanceField(
std::move(grPaint), glyphCount, cache, distanceAdjustTable,
- renderTargetContext->isGammaCorrect(), paint.luminanceColor(), info.hasUseLCDText(),
- useBGR, info.isAntiAliased());
+ renderTargetContext->colorSpaceInfo().isGammaCorrect(), paint.luminanceColor(),
+ info.hasUseLCDText(), useBGR, info.isAntiAliased());
} else {
op = GrAtlasTextOp::MakeBitmap(std::move(grPaint), format, glyphCount, cache);
}