aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrAtlasTextContext.cpp
diff options
context:
space:
mode:
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) {