Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: src/gpu/text/GrTextUtils.cpp

Issue 1711223003: Only use fake gamma with linear devices. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Formatting. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrTextUtils.cpp
diff --git a/src/gpu/text/GrTextUtils.cpp b/src/gpu/text/GrTextUtils.cpp
index 59ecbc0fbabe03ad1235ed23b42795a19ea12e7d..112f5bd31942aae3538a2f31c15733fa77cd1956 100644
--- a/src/gpu/text/GrTextUtils.cpp
+++ b/src/gpu/text/GrTextUtils.cpp
@@ -57,7 +57,8 @@ void GrTextUtils::DrawBmpText(GrAtlasTextBlob* blob, int runIndex,
GrBatchTextStrike* currStrike = nullptr;
// Get GrFontScaler from cache
- SkGlyphCache* cache = blob->setupCache(runIndex, props, skPaint, &viewMatrix, false);
+ SkGlyphCache* cache = blob->setupCache(runIndex, props, SkPaint::FakeGamma::On,
+ skPaint, &viewMatrix);
GrFontScaler* fontScaler = GrTextUtils::GetGrFontScaler(cache);
SkFindAndPlaceGlyph::ProcessText(
@@ -98,7 +99,8 @@ void GrTextUtils::DrawBmpPosText(GrAtlasTextBlob* blob, int runIndex,
GrBatchTextStrike* currStrike = nullptr;
// Get GrFontScaler from cache
- SkGlyphCache* cache = blob->setupCache(runIndex, props, skPaint, &viewMatrix, false);
+ SkGlyphCache* cache = blob->setupCache(runIndex, props, SkPaint::FakeGamma::On,
+ skPaint, &viewMatrix);
GrFontScaler* fontScaler = GrTextUtils::GetGrFontScaler(cache);
SkFindAndPlaceGlyph::ProcessPosText(
@@ -258,7 +260,7 @@ void GrTextUtils::DrawDFText(GrAtlasTextBlob* blob, int runIndex,
SkDrawCacheProc glyphCacheProc = skPaint.getDrawCacheProc();
SkAutoDescriptor desc;
- skPaint.getScalerContextDescriptor(&desc, props, nullptr, true);
+ skPaint.getScalerContextDescriptor(&desc, props, SkPaint::FakeGamma::Off, nullptr);
SkGlyphCache* origPaintCache = SkGlyphCache::DetachCache(skPaint.getTypeface(),
desc.getDesc());
@@ -339,7 +341,8 @@ void GrTextUtils::DrawDFPosText(GrAtlasTextBlob* blob, int runIndex,
GrBatchTextStrike* currStrike = nullptr;
- SkGlyphCache* cache = blob->setupCache(runIndex, props, dfPaint, nullptr, true);
+ SkGlyphCache* cache = blob->setupCache(runIndex, props, SkPaint::FakeGamma::Off,
+ dfPaint, nullptr);
SkDrawCacheProc glyphCacheProc = dfPaint.getDrawCacheProc();
GrFontScaler* fontScaler = GrTextUtils::GetGrFontScaler(cache);
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698