aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrAtlasTextContext.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-02-10 08:52:24 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-10 08:52:24 -0800
commit2f2ee83a9c1ff05a94265b175e51c63fc424d554 (patch)
tree5d281c8cb6f3113384f17bc65d4d060bc01fd0f4 /src/gpu/text/GrAtlasTextContext.cpp
parent9972c424ea5eaa2d78e06ae068abc86fd408e0e3 (diff)
cleanup textblob cache sanity check and prevent it from bitrotting
Diffstat (limited to 'src/gpu/text/GrAtlasTextContext.cpp')
-rw-r--r--src/gpu/text/GrAtlasTextContext.cpp10
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) {