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

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

Issue 1684513004: cleanup textblob cache sanity check and prevent it from bitrotting (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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/GrAtlasTextBlob.cpp ('k') | src/gpu/text/GrTextBlobCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrAtlasTextContext.cpp
diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp
index eef4f0bff62e4e5e7d1fdacbc71ef14cee3aa838..91fa658110eb8fdc38acd09e704caf432606f0a8 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) {
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.cpp ('k') | src/gpu/text/GrTextBlobCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698