Changeset 165641 in webkit
- Timestamp:
- Mar 14, 2014 1:33:44 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r165640 r165641 1 2014-03-14 Frédéric Wang <fred.wang@free.fr> 2 3 FontCache: Replace DEPRECATED_DEFINE_STATIC_LOCAL with static NeverDestroyed<T>. 4 https://bugs.webkit.org/show_bug.cgi?id=130233 5 6 Reviewed by Andreas Kling. 7 8 No new tests. 9 10 * platform/graphics/FontCache.cpp: 11 (WebCore::fontCache): 12 (WebCore::FontVerticalDataCacheKeyTraits::emptyValue): 13 (WebCore::fontVerticalDataCacheInstance): 14 (WebCore::FontDataCacheKeyTraits::emptyValue): 15 * platform/graphics/FontCache.h: 16 1 17 2014-03-11 Oliver Hunt <oliver@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/FontCache.cpp
r165607 r165641 38 38 #include <wtf/HashMap.h> 39 39 #include <wtf/ListHashSet.h> 40 #include <wtf/NeverDestroyed.h> 40 41 #include <wtf/StdLibExtras.h> 41 42 #include <wtf/text/AtomicStringHash.h> … … 88 89 FontCache* fontCache() 89 90 { 90 DEPRECATED_DEFINE_STATIC_LOCAL(FontCache, globalFontCache, ());91 return &globalFontCache ;91 static NeverDestroyed<FontCache> globalFontCache; 92 return &globalFontCache.get(); 92 93 } 93 94 … … 286 287 static const FontCache::FontFileKey& emptyValue() 287 288 { 288 DEPRECATED_DEFINE_STATIC_LOCAL(FontCache::FontFileKey, key, (nullAtom));289 static NeverDestroyed<FontCache::FontFileKey> key = nullAtom; 289 290 return key; 290 291 } … … 303 304 FontVerticalDataCache& fontVerticalDataCacheInstance() 304 305 { 305 DEPRECATED_DEFINE_STATIC_LOCAL(FontVerticalDataCache, fontVerticalDataCache, ());306 static NeverDestroyed<FontVerticalDataCache> fontVerticalDataCache; 306 307 return fontVerticalDataCache; 307 308 } … … 341 342 static const FontPlatformData& emptyValue() 342 343 { 343 DEPRECATED_DEFINE_STATIC_LOCAL(FontPlatformData, key, (0.f, false, false));344 static NeverDestroyed<FontPlatformData> key(0.f, false, false); 344 345 return key; 345 346 } -
trunk/Source/WebCore/platform/graphics/FontCache.h
r163657 r165641 105 105 class FontCache { 106 106 friend class FontCachePurgePreventer; 107 friend class WTF::NeverDestroyed<FontCache>; 107 108 108 109 WTF_MAKE_NONCOPYABLE(FontCache); WTF_MAKE_FAST_ALLOCATED;
Note: See TracChangeset
for help on using the changeset viewer.