| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 purgePlatformFontDataCache(); | 291 purgePlatformFontDataCache(); |
| 292 purgeFontVerticalDataCache(); | 292 purgeFontVerticalDataCache(); |
| 293 purgeFallbackListShaperCache(); | 293 purgeFallbackListShaperCache(); |
| 294 } | 294 } |
| 295 | 295 |
| 296 static bool invalidateFontCache = false; | 296 static bool invalidateFontCache = false; |
| 297 | 297 |
| 298 HeapHashSet<WeakMember<FontCacheClient>>& fontCacheClients() | 298 HeapHashSet<WeakMember<FontCacheClient>>& fontCacheClients() |
| 299 { | 299 { |
| 300 DEFINE_STATIC_LOCAL(HeapHashSet<WeakMember<FontCacheClient>>, clients, (new
HeapHashSet<WeakMember<FontCacheClient>>)); | 300 DEFINE_STATIC_LOCAL(Persistent<HeapHashSet<WeakMember<FontCacheClient>>>, cl
ients, (new HeapHashSet<WeakMember<FontCacheClient>>())); |
| 301 invalidateFontCache = true; | 301 invalidateFontCache = true; |
| 302 return clients; | 302 return *clients; |
| 303 } | 303 } |
| 304 | 304 |
| 305 void FontCache::addClient(FontCacheClient* client) | 305 void FontCache::addClient(FontCacheClient* client) |
| 306 { | 306 { |
| 307 ASSERT(!fontCacheClients().contains(client)); | 307 ASSERT(!fontCacheClients().contains(client)); |
| 308 fontCacheClients().add(client); | 308 fontCacheClients().add(client); |
| 309 } | 309 } |
| 310 | 310 |
| 311 #if !ENABLE(OILPAN) | 311 #if !ENABLE(OILPAN) |
| 312 void FontCache::removeClient(FontCacheClient* client) | 312 void FontCache::removeClient(FontCacheClient* client) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 iter != gFallbackListShaperCache->end(); | 377 iter != gFallbackListShaperCache->end(); |
| 378 ++iter) { | 378 ++iter) { |
| 379 shapeResultCacheSize += iter->value->byteSize(); | 379 shapeResultCacheSize += iter->value->byteSize(); |
| 380 } | 380 } |
| 381 dump->addScalar("size", "bytes", shapeResultCacheSize); | 381 dump->addScalar("size", "bytes", shapeResultCacheSize); |
| 382 memoryDump->addSuballocation(dump->guid(), String(WTF::Partitions::kAllocate
dObjectPoolName)); | 382 memoryDump->addSuballocation(dump->guid(), String(WTF::Partitions::kAllocate
dObjectPoolName)); |
| 383 } | 383 } |
| 384 | 384 |
| 385 | 385 |
| 386 } // namespace blink | 386 } // namespace blink |
| OLD | NEW |