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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 return fontDataFromFontPlatformData(platformData, shouldRetain); | 144 return fontDataFromFontPlatformData(platformData, shouldRetain); |
145 | 145 |
146 return nullptr; | 146 return nullptr; |
147 } | 147 } |
148 | 148 |
149 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(const FontPla
tformData* platformData, ShouldRetain shouldRetain) | 149 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(const FontPla
tformData* platformData, ShouldRetain shouldRetain) |
150 { | 150 { |
151 if (!gFontDataCache) | 151 if (!gFontDataCache) |
152 gFontDataCache = new FontDataCache; | 152 gFontDataCache = new FontDataCache; |
153 | 153 |
154 #if ASSERT_ENABLED | 154 #if ENABLE(ASSERT) |
155 if (shouldRetain == DoNotRetain) | 155 if (shouldRetain == DoNotRetain) |
156 ASSERT(m_purgePreventCount); | 156 ASSERT(m_purgePreventCount); |
157 #endif | 157 #endif |
158 | 158 |
159 return gFontDataCache->get(platformData, shouldRetain); | 159 return gFontDataCache->get(platformData, shouldRetain); |
160 } | 160 } |
161 | 161 |
162 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription,
const AtomicString& family) | 162 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription,
const AtomicString& family) |
163 { | 163 { |
164 bool checkingAlternateName = true; | 164 bool checkingAlternateName = true; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 clients.append(*it); | 283 clients.append(*it); |
284 | 284 |
285 ASSERT(numClients == clients.size()); | 285 ASSERT(numClients == clients.size()); |
286 for (size_t i = 0; i < numClients; ++i) | 286 for (size_t i = 0; i < numClients; ++i) |
287 clients[i]->fontCacheInvalidated(); | 287 clients[i]->fontCacheInvalidated(); |
288 | 288 |
289 purge(ForcePurge); | 289 purge(ForcePurge); |
290 } | 290 } |
291 | 291 |
292 } // namespace WebCore | 292 } // namespace WebCore |
OLD | NEW |