Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: Source/platform/fonts/FontCache.cpp

Issue 468443002: Cleanup namespace usage in platform/fonts/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup namespace usage in platform/fonts/. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/fonts/FontCache.h ('k') | Source/platform/fonts/FontCacheKey.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontCache.h ('k') | Source/platform/fonts/FontCacheKey.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698