| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #endif // !OS(WIN) | 62 #endif // !OS(WIN) |
| 63 | 63 |
| 64 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa
cheKeyTraits> FontPlatformDataCache; | 64 typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCa
cheKeyTraits> FontPlatformDataCache; |
| 65 | 65 |
| 66 static FontPlatformDataCache* gFontPlatformDataCache = 0; | 66 static FontPlatformDataCache* gFontPlatformDataCache = 0; |
| 67 | 67 |
| 68 #if OS(WIN) | 68 #if OS(WIN) |
| 69 bool FontCache::s_useDirectWrite = false; | 69 bool FontCache::s_useDirectWrite = false; |
| 70 IDWriteFactory* FontCache::s_directWriteFactory = 0; | 70 IDWriteFactory* FontCache::s_directWriteFactory = 0; |
| 71 bool FontCache::s_useSubpixelPositioning = false; | 71 bool FontCache::s_useSubpixelPositioning = false; |
| 72 float FontCache::s_deviceScaleFactor = 1.0; |
| 72 #endif // OS(WIN) | 73 #endif // OS(WIN) |
| 73 | 74 |
| 74 FontCache* FontCache::fontCache() | 75 FontCache* FontCache::fontCache() |
| 75 { | 76 { |
| 76 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); | 77 DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ()); |
| 77 return &globalFontCache; | 78 return &globalFontCache; |
| 78 } | 79 } |
| 79 | 80 |
| 80 FontPlatformData* FontCache::getFontPlatformData(const FontDescription& fontDesc
ription, | 81 FontPlatformData* FontCache::getFontPlatformData(const FontDescription& fontDesc
ription, |
| 81 const FontFaceCreationParams& creationParams, bool checkingAlternateName) | 82 const FontFaceCreationParams& creationParams, bool checkingAlternateName) |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 clients.append(*it); | 285 clients.append(*it); |
| 285 | 286 |
| 286 ASSERT(numClients == clients.size()); | 287 ASSERT(numClients == clients.size()); |
| 287 for (size_t i = 0; i < numClients; ++i) | 288 for (size_t i = 0; i < numClients; ++i) |
| 288 clients[i]->fontCacheInvalidated(); | 289 clients[i]->fontCacheInvalidated(); |
| 289 | 290 |
| 290 purge(ForcePurge); | 291 purge(ForcePurge); |
| 291 } | 292 } |
| 292 | 293 |
| 293 } // namespace blink | 294 } // namespace blink |
| OLD | NEW |