| OLD | NEW |
| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 { | 386 { |
| 387 ASSERT(isMainThread()); | 387 ASSERT(isMainThread()); |
| 388 if (!gFontPlatformDataCache) | 388 if (!gFontPlatformDataCache) |
| 389 return; | 389 return; |
| 390 base::trace_event::MemoryAllocatorDump* dump = memoryDump->CreateAllocatorDu
mp("font_caches/font_platform_data_cache"); | 390 base::trace_event::MemoryAllocatorDump* dump = memoryDump->CreateAllocatorDu
mp("font_caches/font_platform_data_cache"); |
| 391 size_t fontPlatformDataObjectsSize = gFontPlatformDataCache->size() * sizeof
(FontPlatformData); | 391 size_t fontPlatformDataObjectsSize = gFontPlatformDataCache->size() * sizeof
(FontPlatformData); |
| 392 dump->AddScalar("size", "bytes", fontPlatformDataObjectsSize); | 392 dump->AddScalar("size", "bytes", fontPlatformDataObjectsSize); |
| 393 memoryDump->AddSuballocation(dump->guid(), WTF::Partitions::kAllocatedObject
PoolName); | 393 memoryDump->AddSuballocation(dump->guid(), WTF::Partitions::kAllocatedObject
PoolName); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void FontCache::dumpFontDataCache(base::trace_event::ProcessMemoryDump* memoryDu
mp) |
| 397 { |
| 398 DCHECK(isMainThread()); |
| 399 if (!gFontDataCache) |
| 400 return; |
| 401 gFontDataCache->dumpCountAndGlyphToBoundsMaps(memoryDump); |
| 402 } |
| 403 |
| 396 void FontCache::dumpShapeResultCache(base::trace_event::ProcessMemoryDump* memor
yDump) | 404 void FontCache::dumpShapeResultCache(base::trace_event::ProcessMemoryDump* memor
yDump) |
| 397 { | 405 { |
| 398 ASSERT(isMainThread()); | 406 ASSERT(isMainThread()); |
| 399 if (!gFallbackListShaperCache) { | 407 if (!gFallbackListShaperCache) { |
| 400 return; | 408 return; |
| 401 } | 409 } |
| 402 base::trace_event::MemoryAllocatorDump* dump = memoryDump->CreateAllocatorDu
mp("font_caches/shape_caches"); | 410 base::trace_event::MemoryAllocatorDump* dump = memoryDump->CreateAllocatorDu
mp("font_caches/shape_caches"); |
| 403 size_t shapeResultCacheSize = 0; | 411 size_t shapeResultCacheSize = 0; |
| 404 FallbackListShaperCache::iterator iter; | 412 FallbackListShaperCache::iterator iter; |
| 405 for (iter = gFallbackListShaperCache->begin(); | 413 for (iter = gFallbackListShaperCache->begin(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 422 case USCRIPT_SIMPLIFIED_HAN: | 430 case USCRIPT_SIMPLIFIED_HAN: |
| 423 return "zh-Hans"; | 431 return "zh-Hans"; |
| 424 case USCRIPT_TRADITIONAL_HAN: | 432 case USCRIPT_TRADITIONAL_HAN: |
| 425 return "zh-Hant"; | 433 return "zh-Hant"; |
| 426 default: | 434 default: |
| 427 return locale.ascii(); | 435 return locale.ascii(); |
| 428 } | 436 } |
| 429 } | 437 } |
| 430 | 438 |
| 431 } // namespace blink | 439 } // namespace blink |
| OLD | NEW |