| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 409 |
| 410 HeapHashSet<WeakMember<FontCacheClient>>& fontCacheClients() { | 410 HeapHashSet<WeakMember<FontCacheClient>>& fontCacheClients() { |
| 411 DEFINE_STATIC_LOCAL(HeapHashSet<WeakMember<FontCacheClient>>, clients, | 411 DEFINE_STATIC_LOCAL(HeapHashSet<WeakMember<FontCacheClient>>, clients, |
| 412 (new HeapHashSet<WeakMember<FontCacheClient>>)); | 412 (new HeapHashSet<WeakMember<FontCacheClient>>)); |
| 413 invalidateFontCache = true; | 413 invalidateFontCache = true; |
| 414 return clients; | 414 return clients; |
| 415 } | 415 } |
| 416 | 416 |
| 417 void FontCache::addClient(FontCacheClient* client) { | 417 void FontCache::addClient(FontCacheClient* client) { |
| 418 ASSERT(!fontCacheClients().contains(client)); | 418 ASSERT(!fontCacheClients().contains(client)); |
| 419 fontCacheClients().add(client); | 419 fontCacheClients().insert(client); |
| 420 } | 420 } |
| 421 | 421 |
| 422 static unsigned short gGeneration = 0; | 422 static unsigned short gGeneration = 0; |
| 423 | 423 |
| 424 unsigned short FontCache::generation() { | 424 unsigned short FontCache::generation() { |
| 425 return gGeneration; | 425 return gGeneration; |
| 426 } | 426 } |
| 427 | 427 |
| 428 void FontCache::invalidate() { | 428 void FontCache::invalidate() { |
| 429 if (!invalidateFontCache) { | 429 if (!invalidateFontCache) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |