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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 return nullptr; 278 return nullptr;
279 } 279 }
280 280
281 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData( 281 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(
282 const FontPlatformData* platformData, 282 const FontPlatformData* platformData,
283 ShouldRetain shouldRetain, 283 ShouldRetain shouldRetain,
284 bool subpixelAscentDescent) { 284 bool subpixelAscentDescent) {
285 if (!gFontDataCache) 285 if (!gFontDataCache)
286 gFontDataCache = new FontDataCache; 286 gFontDataCache = new FontDataCache;
287 287
288 #if ENABLE(ASSERT) 288 #if DCHECK_IS_ON()
289 if (shouldRetain == DoNotRetain) 289 if (shouldRetain == DoNotRetain)
290 ASSERT(m_purgePreventCount); 290 ASSERT(m_purgePreventCount);
291 #endif 291 #endif
292 292
293 return gFontDataCache->get(platformData, shouldRetain, subpixelAscentDescent); 293 return gFontDataCache->get(platformData, shouldRetain, subpixelAscentDescent);
294 } 294 }
295 295
296 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription, 296 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription,
297 const AtomicString& family) { 297 const AtomicString& family) {
298 bool checkingAlternateName = true; 298 bool checkingAlternateName = true;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 for (iter = gFallbackListShaperCache->begin(); 482 for (iter = gFallbackListShaperCache->begin();
483 iter != gFallbackListShaperCache->end(); ++iter) { 483 iter != gFallbackListShaperCache->end(); ++iter) {
484 shapeResultCacheSize += iter->value->byteSize(); 484 shapeResultCacheSize += iter->value->byteSize();
485 } 485 }
486 dump->AddScalar("size", "bytes", shapeResultCacheSize); 486 dump->AddScalar("size", "bytes", shapeResultCacheSize);
487 memoryDump->AddSuballocation(dump->guid(), 487 memoryDump->AddSuballocation(dump->guid(),
488 WTF::Partitions::kAllocatedObjectPoolName); 488 WTF::Partitions::kAllocatedObjectPoolName);
489 } 489 }
490 490
491 } // namespace blink 491 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698