diff options
author | Khushal <khushalsagar@chromium.org> | 2018-05-30 21:49:44 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-31 16:18:23 +0000 |
commit | 489e2bdae83e849d12695044dc61837c06d3f76d (patch) | |
tree | 4df2713bc652b3e11592a87027c19127d1185207 /src/core/SkRemoteGlyphCache.cpp | |
parent | bbcb7f7fc01af03a9f3df6c929e426e758d522ed (diff) |
fonts: Fix image cache miss from glyphs too large for atlas.
R=herb@google.com
Bug: 829622
Change-Id: I17994663318c8db3537e99ef11aaee7beb2da23f
Reviewed-on: https://skia-review.googlesource.com/131056
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
Diffstat (limited to 'src/core/SkRemoteGlyphCache.cpp')
-rw-r--r-- | src/core/SkRemoteGlyphCache.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkRemoteGlyphCache.cpp b/src/core/SkRemoteGlyphCache.cpp index a987e5bdde..17edc83064 100644 --- a/src/core/SkRemoteGlyphCache.cpp +++ b/src/core/SkRemoteGlyphCache.cpp @@ -602,6 +602,9 @@ void SkStrikeServer::SkGlyphCacheState::writePendingGlyphs(Serializer* serialize glyph->fPathData = nullptr; glyph->fImage = nullptr; + // Glyphs which are too large for the atlas still request images when computing the bounds + // for the glyph, which is why its necessary to send both. See related code in + // get_packed_glyph_bounds in GrGlyphCache.cpp and crbug.com/510931. bool tooLargeForAtlas = false; #if SK_SUPPORT_GPU tooLargeForAtlas = GrDrawOpAtlas::GlyphTooLargeForAtlas(glyph->fWidth, glyph->fHeight); @@ -611,7 +614,6 @@ void SkStrikeServer::SkGlyphCacheState::writePendingGlyphs(Serializer* serialize // for this glyph. fCachedGlyphPaths.add(glyphID); writeGlyphPath(glyphID, serializer); - continue; } auto imageSize = glyph->computeImageSize(); @@ -758,7 +760,6 @@ bool SkStrikeClient::readStrikeData(const volatile void* memory, size_t memorySi #endif if (tooLargeForAtlas) { if (!read_path(&deserializer, allocatedGlyph, strike.get())) READ_FAILURE - continue; } auto imageSize = glyph.computeImageSize(); |