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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 result = getFontPlatformData(fontDescription, createByAlternateFamil
y, true); | 107 result = getFontPlatformData(fontDescription, createByAlternateFamil
y, true); |
108 } | 108 } |
109 if (result) | 109 if (result) |
110 gFontPlatformDataCache->set(key, adoptPtr(new FontPlatformData(*resu
lt))); // Cache the result under the old name. | 110 gFontPlatformDataCache->set(key, adoptPtr(new FontPlatformData(*resu
lt))); // Cache the result under the old name. |
111 } | 111 } |
112 | 112 |
113 return result; | 113 return result; |
114 } | 114 } |
115 | 115 |
116 #if ENABLE(OPENTYPE_VERTICAL) | 116 #if ENABLE(OPENTYPE_VERTICAL) |
117 typedef HashMap<FontCache::FontFileKey, RefPtr<OpenTypeVerticalData>, WTF::IntHa
sh<FontCache::FontFileKey>, WTF::UnsignedWithZeroKeyHashTraits<FontCache::FontFi
leKey> > FontVerticalDataCache; | 117 typedef HashMap<FontCache::FontFileKey, RefPtr<OpenTypeVerticalData>, IntHash<Fo
ntCache::FontFileKey>, UnsignedWithZeroKeyHashTraits<FontCache::FontFileKey> > F
ontVerticalDataCache; |
118 | 118 |
119 FontVerticalDataCache& fontVerticalDataCacheInstance() | 119 FontVerticalDataCache& fontVerticalDataCacheInstance() |
120 { | 120 { |
121 DEFINE_STATIC_LOCAL(FontVerticalDataCache, fontVerticalDataCache, ()); | 121 DEFINE_STATIC_LOCAL(FontVerticalDataCache, fontVerticalDataCache, ()); |
122 return fontVerticalDataCache; | 122 return fontVerticalDataCache; |
123 } | 123 } |
124 | 124 |
125 PassRefPtr<OpenTypeVerticalData> FontCache::getVerticalData(const FontFileKey& k
ey, const FontPlatformData& platformData) | 125 PassRefPtr<OpenTypeVerticalData> FontCache::getVerticalData(const FontFileKey& k
ey, const FontPlatformData& platformData) |
126 { | 126 { |
127 FontVerticalDataCache& fontVerticalDataCache = fontVerticalDataCacheInstance
(); | 127 FontVerticalDataCache& fontVerticalDataCache = fontVerticalDataCacheInstance
(); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 clients.append(*it); | 284 clients.append(*it); |
285 | 285 |
286 ASSERT(numClients == clients.size()); | 286 ASSERT(numClients == clients.size()); |
287 for (size_t i = 0; i < numClients; ++i) | 287 for (size_t i = 0; i < numClients; ++i) |
288 clients[i]->fontCacheInvalidated(); | 288 clients[i]->fontCacheInvalidated(); |
289 | 289 |
290 purge(ForcePurge); | 290 purge(ForcePurge); |
291 } | 291 } |
292 | 292 |
293 } // namespace blink | 293 } // namespace blink |
OLD | NEW |