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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 return; | 226 return; |
227 | 227 |
228 purgePlatformFontDataCache(); | 228 purgePlatformFontDataCache(); |
229 purgeFontVerticalDataCache(); | 229 purgeFontVerticalDataCache(); |
230 } | 230 } |
231 | 231 |
232 static bool invalidateFontCache = false; | 232 static bool invalidateFontCache = false; |
233 | 233 |
234 WillBeHeapHashSet<RawPtrWillBeWeakMember<FontCacheClient>>& fontCacheClients() | 234 WillBeHeapHashSet<RawPtrWillBeWeakMember<FontCacheClient>>& fontCacheClients() |
235 { | 235 { |
236 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeWea
kMember<FontCacheClient>> >, clients, (adoptPtrWillBeNoop(new WillBeHeapHashSet<
RawPtrWillBeWeakMember<FontCacheClient>>()))); | 236 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeWea
kMember<FontCacheClient>>>, clients, (adoptPtrWillBeNoop(new WillBeHeapHashSet<R
awPtrWillBeWeakMember<FontCacheClient>>()))); |
237 invalidateFontCache = true; | 237 invalidateFontCache = true; |
238 return *clients; | 238 return *clients; |
239 } | 239 } |
240 | 240 |
241 void FontCache::addClient(FontCacheClient* client) | 241 void FontCache::addClient(FontCacheClient* client) |
242 { | 242 { |
243 ASSERT(!fontCacheClients().contains(client)); | 243 ASSERT(!fontCacheClients().contains(client)); |
244 fontCacheClients().add(client); | 244 fontCacheClients().add(client); |
245 } | 245 } |
246 | 246 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 clients.append(*it); | 281 clients.append(*it); |
282 | 282 |
283 ASSERT(numClients == clients.size()); | 283 ASSERT(numClients == clients.size()); |
284 for (size_t i = 0; i < numClients; ++i) | 284 for (size_t i = 0; i < numClients; ++i) |
285 clients[i]->fontCacheInvalidated(); | 285 clients[i]->fontCacheInvalidated(); |
286 | 286 |
287 purge(ForcePurge); | 287 purge(ForcePurge); |
288 } | 288 } |
289 | 289 |
290 } // namespace blink | 290 } // namespace blink |
OLD | NEW |