Atlas generation numbers is not tracking plot changes -- disable it

The atlas generation number is used avoid checking if each glyph has
a valid plot location. If the atlas generation number ever misses
an eviction of a plot, then some glyph atlas coordinates will be considered
valid when in fact they are stale.

Fix: Always check the texture coordinates of every glyph. Don't use the
atlas generation numbering to reduce work.

Bug: chromium:1045016
Change-Id: I287d3bbcd0a5d679327002595ae50e0f775dca12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267096
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
Herb Derby 2020-01-28 14:04:09 -05:00 committed by Skia Commit-Bot
parent a4ecfd10b4
commit 6d54a1e5f0

View File

@ -860,7 +860,10 @@ std::tuple<bool, int> GrTextBlob::VertexRegenerator::regenerate(int begin, int e
// the atlas generation.
fRegenerateTextureCoordinates =
fRegenerateTextureCoordinates || fSubRun->fAtlasGeneration != currentAtlasGen;
if (fSubRun->strike()->isAbandoned() || fRegenerateTextureCoordinates) {
// The true || ... is to fix chrome bug 1045016. This is a temporary fix.
// TODO: figure out why the atlas number is getting off track, and restore the check.
if (true || fSubRun->strike()->isAbandoned() || fRegenerateTextureCoordinates) {
return this->updateTextureCoordinatesMaybeStrike(begin, end);
} else {
// All glyphs are inserted into the atlas if fCurrGlyph is at the end of fGlyphs.