diff options
author | 2016-02-10 08:52:24 -0800 | |
---|---|---|
committer | 2016-02-10 08:52:24 -0800 | |
commit | 2f2ee83a9c1ff05a94265b175e51c63fc424d554 (patch) | |
tree | 5d281c8cb6f3113384f17bc65d4d060bc01fd0f4 /src/gpu/text/GrAtlasTextContext.cpp | |
parent | 9972c424ea5eaa2d78e06ae068abc86fd408e0e3 (diff) |
cleanup textblob cache sanity check and prevent it from bitrotting
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684513004
Review URL: https://codereview.chromium.org/1684513004
Diffstat (limited to 'src/gpu/text/GrAtlasTextContext.cpp')
-rw-r--r-- | src/gpu/text/GrAtlasTextContext.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp index eef4f0bff6..91fa658110 100644 --- a/src/gpu/text/GrAtlasTextContext.cpp +++ b/src/gpu/text/GrAtlasTextContext.cpp @@ -156,20 +156,18 @@ void GrAtlasTextContext::drawTextBlob(GrDrawContext* dc, blob, x, y, drawFilter); } else { fCache->makeMRU(cacheBlob); -#ifdef CACHE_SANITY_CHECK - { + + if (CACHE_SANITY_CHECK) { int glyphCount = 0; int runCount = 0; GrTextBlobCache::BlobGlyphCount(&glyphCount, &runCount, blob); - SkAutoTUnref<GrAtlasTextBlob> sanityBlob(fCache->createBlob(glyphCount, runCount, - kGrayTextVASize)); + SkAutoTUnref<GrAtlasTextBlob> sanityBlob( + fCache->createBlob(glyphCount, runCount, GrAtlasTextBlob::kGrayTextVASize)); GrTextBlobCache::SetupCacheBlobKey(sanityBlob, key, blurRec, skPaint); this->regenerateTextBlob(sanityBlob, skPaint, grPaint.getColor(), viewMatrix, blob, x, y, drawFilter); GrAtlasTextBlob::AssertEqual(*sanityBlob, *cacheBlob); } - -#endif } } else { if (canCache) { |