diff options
author | 2016-07-07 12:22:39 -0700 | |
---|---|---|
committer | 2016-07-07 12:22:39 -0700 | |
commit | 920af9fac3d9e275a93910d9c626ee7bc23ed17a (patch) | |
tree | 05f76b53b77b23aedcaaf915de872c2f54fcc718 /src | |
parent | 27bb28473912181cf9a838e9282e86cb62e2d44b (diff) |
Use sRGB pixel config for ARGB masks (color emoji)
Fixes over-bright color emoji and GM:colortype in sRGB mode
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2129913004
Review-Url: https://codereview.chromium.org/2129913004
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/text/GrBatchFontCache.cpp | 2 | ||||
-rw-r--r-- | src/gpu/text/GrBatchFontCache.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/text/GrBatchFontCache.cpp b/src/gpu/text/GrBatchFontCache.cpp index faafc16a13..3e212cd171 100644 --- a/src/gpu/text/GrBatchFontCache.cpp +++ b/src/gpu/text/GrBatchFontCache.cpp @@ -18,7 +18,7 @@ bool GrBatchFontCache::initAtlas(GrMaskFormat format) { int index = MaskFormatToAtlasIndex(format); if (!fAtlases[index]) { - GrPixelConfig config = MaskFormatToPixelConfig(format); + GrPixelConfig config = MaskFormatToPixelConfig(format, *fContext->caps()); int width = fAtlasConfigs[index].fWidth; int height = fAtlasConfigs[index].fHeight; int numPlotsX = fAtlasConfigs[index].numPlotsX(); diff --git a/src/gpu/text/GrBatchFontCache.h b/src/gpu/text/GrBatchFontCache.h index 42612fe8b6..78d7b75961 100644 --- a/src/gpu/text/GrBatchFontCache.h +++ b/src/gpu/text/GrBatchFontCache.h @@ -186,11 +186,11 @@ public: void setAtlasSizes_ForTesting(const GrBatchAtlasConfig configs[3]); private: - static GrPixelConfig MaskFormatToPixelConfig(GrMaskFormat format) { + static GrPixelConfig MaskFormatToPixelConfig(GrMaskFormat format, const GrCaps& caps) { static const GrPixelConfig kPixelConfigs[] = { kAlpha_8_GrPixelConfig, kRGB_565_GrPixelConfig, - kSkia8888_GrPixelConfig + caps.srgbSupport() ? kSkiaGamma8888_GrPixelConfig : kSkia8888_GrPixelConfig }; static_assert(SK_ARRAY_COUNT(kPixelConfigs) == kMaskFormatCount, "array_size_mismatch"); |