Remove SkPaint::kGenA8FromLCD_Flag.
The original intent of this flag is now handled by SkPixelGeomety on
SkSurfaceProps on SkSurface.
BUG=skia:7515
Change-Id: I54bb1be072b5b5b2164a59196bfeacac254823c7
Reviewed-on: https://skia-review.googlesource.com/121346
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 7acf617..8ec5f4e 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -258,10 +258,11 @@
std::unique_ptr<GrAtlasTextOp> op;
if (info.drawAsDistanceFields()) {
bool useBGR = SkPixelGeometryIsBGR(props.pixelGeometry());
+ bool useLCD = info.hasUseLCDText() && props.pixelGeometry() != kUnknown_SkPixelGeometry;
op = GrAtlasTextOp::MakeDistanceField(
std::move(grPaint), glyphCount, distanceAdjustTable,
target->colorSpaceInfo().isGammaCorrect(), paint.luminanceColor(),
- info.hasUseLCDText(), useBGR, info.isAntiAliased());
+ useLCD, useBGR, info.isAntiAliased());
} else {
op = GrAtlasTextOp::MakeBitmap(std::move(grPaint), format, glyphCount,
info.hasScaledGlyphs());
@@ -309,7 +310,7 @@
// GrAtlasTextBlob::makeOp only takes uint16_t values for run and subRun indices.
// Encountering something larger than this is highly unlikely, so we'll just not draw it.
int lastRun = SkTMin(fRunCount, (1 << 16)) - 1;
- GrTextUtils::RunPaint runPaint(&paint, nullptr, props);
+ GrTextUtils::RunPaint runPaint(&paint, nullptr);
for (int runIndex = 0; runIndex <= lastRun; runIndex++) {
Run& run = fRuns[runIndex];