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

Unified Diff: src/gpu/text/GrTextBlobCache.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/GrAtlasTextContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrTextBlobCache.cpp
diff --git a/src/gpu/text/GrTextBlobCache.cpp b/src/gpu/text/GrTextBlobCache.cpp
index 685284bee5c02fd062bb84ab29b4ed85feabf8b9..7fa2d1a80a14b3721e20bb6c82e29c311b86d0eb 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);
« no previous file with comments | « src/gpu/text/GrAtlasTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698