aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrTextBlobCache.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/GrTextBlobCache.cpp
parent9972c424ea5eaa2d78e06ae068abc86fd408e0e3 (diff)
cleanup textblob cache sanity check and prevent it from bitrotting
Diffstat (limited to 'src/gpu/text/GrTextBlobCache.cpp')
-rw-r--r--src/gpu/text/GrTextBlobCache.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/text/GrTextBlobCache.cpp b/src/gpu/text/GrTextBlobCache.cpp
index 685284bee5..7fa2d1a80a 100644
--- a/src/gpu/text/GrTextBlobCache.cpp
+++ b/src/gpu/text/GrTextBlobCache.cpp
@@ -23,14 +23,12 @@ GrAtlasTextBlob* GrTextBlobCache::createBlob(int glyphCount, int runCount, size_
sizeof(GrAtlasTextBlob::Run) * runCount;
void* allocation = fPool.allocate(size);
-#ifdef CACHE_SANITY_CHECK
- sk_bzero(allocation, size);
-#endif
+ if (CACHE_SANITY_CHECK) {
+ sk_bzero(allocation, size);
+ }
GrAtlasTextBlob* cacheBlob = new (allocation) GrAtlasTextBlob;
-#ifdef CACHE_SANITY_CHECK
cacheBlob->fSize = size;
-#endif
// setup offsets for vertices / glyphs
cacheBlob->fVertices = sizeof(GrAtlasTextBlob) + reinterpret_cast<unsigned char*>(cacheBlob);