| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "wtf/HashMap.h" | 46 #include "wtf/HashMap.h" |
| 47 #include "wtf/ListHashSet.h" | 47 #include "wtf/ListHashSet.h" |
| 48 #include "wtf/StdLibExtras.h" | 48 #include "wtf/StdLibExtras.h" |
| 49 #include "wtf/text/AtomicStringHash.h" | 49 #include "wtf/text/AtomicStringHash.h" |
| 50 #include "wtf/text/StringHash.h" | 50 #include "wtf/text/StringHash.h" |
| 51 | 51 |
| 52 using namespace WTF; | 52 using namespace WTF; |
| 53 | 53 |
| 54 namespace WebCore { | 54 namespace WebCore { |
| 55 | 55 |
| 56 #if !OS(WIN) || ENABLE(GDI_FONTS_ON_WINDOWS) | 56 #if !OS(WIN) |
| 57 FontCache::FontCache() | 57 FontCache::FontCache() |
| 58 : m_purgePreventCount(0) | 58 : m_purgePreventCount(0) |
| 59 { | 59 { |
| 60 } | 60 } |
| 61 #endif // !OS(WIN) || ENABLE(GDI_FONTS_ON_WINDOWS) | 61 #endif // !OS(WIN) |
| 62 | 62 |
| 63 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa
cheKeyTraits> FontPlatformDataCache; | 63 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa
cheKeyTraits> FontPlatformDataCache; |
| 64 | 64 |
| 65 static FontPlatformDataCache* gFontPlatformDataCache = 0; | 65 static FontPlatformDataCache* gFontPlatformDataCache = 0; |
| 66 | 66 |
| 67 FontCache* FontCache::fontCache() | 67 FontCache* FontCache::fontCache() |
| 68 { | 68 { |
| 69 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); | 69 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); |
| 70 return &globalFontCache; | 70 return &globalFontCache; |
| 71 } | 71 } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 clients.append(*it); | 285 clients.append(*it); |
| 286 | 286 |
| 287 ASSERT(numClients == clients.size()); | 287 ASSERT(numClients == clients.size()); |
| 288 for (size_t i = 0; i < numClients; ++i) | 288 for (size_t i = 0; i < numClients; ++i) |
| 289 clients[i]->fontCacheInvalidated(); | 289 clients[i]->fontCacheInvalidated(); |
| 290 | 290 |
| 291 purge(ForcePurge); | 291 purge(ForcePurge); |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace WebCore | 294 } // namespace WebCore |
| OLD | NEW |