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

Side by Side Diff: Source/core/platform/graphics/FontCache.h

Issue 31923005: Move Alternate Family Logic into separate header (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 FontPlatformData* getFontResourcePlatformData(const FontDescription&, const AtomicString& family, bool checkingAlternateName = false); 139 FontPlatformData* getFontResourcePlatformData(const FontDescription&, const AtomicString& family, bool checkingAlternateName = false);
140 140
141 // These methods are implemented by each platform. 141 // These methods are implemented by each platform.
142 PassRefPtr<SimpleFontData> getSimilarFontPlatformData(const Font&); 142 PassRefPtr<SimpleFontData> getSimilarFontPlatformData(const Font&);
143 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi cString& family, float fontSize); 143 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi cString& family, float fontSize);
144 144
145 // Implemented on skia platforms. 145 // Implemented on skia platforms.
146 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const AtomicSt ring& family, CString& name); 146 PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const AtomicSt ring& family, CString& name);
147 147
148 PassRefPtr<SimpleFontData> getFontResourceData(const FontPlatformData*, Shou ldRetain = Retain); 148 PassRefPtr<SimpleFontData> getFontResourceData(const FontPlatformData*, Shou ldRetain = Retain);
149 const FontPlatformData* getFallbackFontData(const FontDescription&);
150 149
151 // Don't purge if this count is > 0; 150 // Don't purge if this count is > 0;
152 int m_purgePreventCount; 151 int m_purgePreventCount;
153 152
154 #if OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS) 153 #if OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS)
155 OwnPtr<SkFontMgr> m_fontManager; 154 OwnPtr<SkFontMgr> m_fontManager;
156 #endif 155 #endif
157 156
158 #if OS(MACOSX) || OS(ANDROID) 157 #if OS(MACOSX) || OS(ANDROID)
159 friend class ComplexTextController; 158 friend class ComplexTextController;
160 #endif 159 #endif
161 friend class SimpleFontData; // For getFontResourceData(const FontPlatformDa ta*) 160 friend class SimpleFontData; // For getFontResourceData(const FontPlatformDa ta*)
162 friend class FontFallbackList; 161 friend class FontFallbackList;
163 }; 162 };
164 163
165 // Get the global fontCache. 164 // Get the global fontCache.
166 FontCache* fontCache(); 165 FontCache* fontCache();
167 166
168 class FontCachePurgePreventer { 167 class FontCachePurgePreventer {
169 public: 168 public:
170 FontCachePurgePreventer() { fontCache()->disablePurging(); } 169 FontCachePurgePreventer() { fontCache()->disablePurging(); }
171 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } 170 ~FontCachePurgePreventer() { fontCache()->enablePurging(); }
172 }; 171 };
173 172
174 } 173 }
175 174
176 #endif 175 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/AlternateFontFamily.h ('k') | Source/core/platform/graphics/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698