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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCache.h

Issue 1931393002: Introduce typeface cache in blink::FontCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip: others Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007-2008 Torch Mobile, Inc. 3 * Copyright (C) 2007-2008 Torch Mobile, Inc.
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 { 160 {
161 ASSERT(m_purgePreventCount); 161 ASSERT(m_purgePreventCount);
162 if (!--m_purgePreventCount) 162 if (!--m_purgePreventCount)
163 purge(PurgeIfNeeded); 163 purge(PurgeIfNeeded);
164 } 164 }
165 165
166 // FIXME: This method should eventually be removed. 166 // FIXME: This method should eventually be removed.
167 FontPlatformData* getFontPlatformData(const FontDescription&, const FontFace CreationParams&, bool checkingAlternateName = false); 167 FontPlatformData* getFontPlatformData(const FontDescription&, const FontFace CreationParams&, bool checkingAlternateName = false);
168 168
169 // These methods are implemented by each platform. 169 // These methods are implemented by each platform.
170 PassOwnPtr<FontPlatformData> createFontPlatformData(const FontDescription&, const FontFaceCreationParams&, float fontSize); 170 PassOwnPtr<FontPlatformData> createFontPlatformData(const FontDescription&, const FontFaceCreationParams&);
171 171
172 // Implemented on skia platforms. 172 // Implemented on skia platforms.
173 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFace CreationParams&, CString& name); 173 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFace CreationParams&, CString& name);
174 174
175 #if OS(ANDROID) || OS(LINUX) 175 #if OS(ANDROID) || OS(LINUX)
176 static AtomicString getFamilyNameForCharacter(SkFontMgr*, UChar32, const Fon tDescription&, FontFallbackPriority); 176 static AtomicString getFamilyNameForCharacter(SkFontMgr*, UChar32, const Fon tDescription&, FontFallbackPriority);
177 #endif 177 #endif
178 178
179 PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription &, UChar32); 179 PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription &, UChar32);
180 180
(...skipping 29 matching lines...) Expand all
210 public: 210 public:
211 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } 211 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); }
212 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } 212 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); }
213 }; 213 };
214 214
215 CString toSkFontMgrLocale(const String& locale); 215 CString toSkFontMgrLocale(const String& locale);
216 216
217 } // namespace blink 217 } // namespace blink
218 218
219 #endif 219 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/Font.cpp ('k') | third_party/WebKit/Source/platform/fonts/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698