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

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

Issue 1930503003: Remove font subpixel positioning flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Retain test-only handling on linux 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/FontCache.cpp » ('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 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void addClient(FontCacheClient*); 97 void addClient(FontCacheClient*);
98 98
99 unsigned short generation(); 99 unsigned short generation();
100 void invalidate(); 100 void invalidate();
101 101
102 SkFontMgr* fontManager() { return m_fontManager.get(); } 102 SkFontMgr* fontManager() { return m_fontManager.get(); }
103 static void setFontManager(const RefPtr<SkFontMgr>&); 103 static void setFontManager(const RefPtr<SkFontMgr>&);
104 104
105 #if OS(WIN) 105 #if OS(WIN)
106 bool useSubpixelPositioning() const { return s_useSubpixelPositioning; }
107 static bool antialiasedTextEnabled() { return s_antialiasedTextEnabled; } 106 static bool antialiasedTextEnabled() { return s_antialiasedTextEnabled; }
108 static bool lcdTextEnabled() { return s_lcdTextEnabled; } 107 static bool lcdTextEnabled() { return s_lcdTextEnabled; }
109 static float deviceScaleFactor() { return s_deviceScaleFactor; } 108 static float deviceScaleFactor() { return s_deviceScaleFactor; }
110 static void setAntialiasedTextEnabled(bool enabled) { s_antialiasedTextEnabl ed = enabled; } 109 static void setAntialiasedTextEnabled(bool enabled) { s_antialiasedTextEnabl ed = enabled; }
111 static void setLCDTextEnabled(bool enabled) { s_lcdTextEnabled = enabled; } 110 static void setLCDTextEnabled(bool enabled) { s_lcdTextEnabled = enabled; }
112 static void setDeviceScaleFactor(float deviceScaleFactor) { s_deviceScaleFac tor = deviceScaleFactor; } 111 static void setDeviceScaleFactor(float deviceScaleFactor) { s_deviceScaleFac tor = deviceScaleFactor; }
113 static void addSideloadedFontForTesting(SkTypeface*); 112 static void addSideloadedFontForTesting(SkTypeface*);
114 // Functions to cache and retrieve the system font metrics. 113 // Functions to cache and retrieve the system font metrics.
115 static void setMenuFontMetrics(const wchar_t* familyName, int32_t fontHeight ); 114 static void setMenuFontMetrics(const wchar_t* familyName, int32_t fontHeight );
116 static void setSmallCaptionFontMetrics(const wchar_t* familyName, int32_t fo ntHeight); 115 static void setSmallCaptionFontMetrics(const wchar_t* familyName, int32_t fo ntHeight);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 int m_purgePreventCount; 182 int m_purgePreventCount;
184 183
185 RefPtr<SkFontMgr> m_fontManager; 184 RefPtr<SkFontMgr> m_fontManager;
186 185
187 static SkFontMgr* s_fontManager; 186 static SkFontMgr* s_fontManager;
188 187
189 #if OS(WIN) 188 #if OS(WIN)
190 static bool s_antialiasedTextEnabled; 189 static bool s_antialiasedTextEnabled;
191 static bool s_lcdTextEnabled; 190 static bool s_lcdTextEnabled;
192 static float s_deviceScaleFactor; 191 static float s_deviceScaleFactor;
193 static bool s_useSubpixelPositioning;
194 static HashMap<String, RefPtr<SkTypeface>>* s_sideloadedFonts; 192 static HashMap<String, RefPtr<SkTypeface>>* s_sideloadedFonts;
195 // The system font metrics cache. 193 // The system font metrics cache.
196 static AtomicString* s_menuFontFamilyName; 194 static AtomicString* s_menuFontFamilyName;
197 static int32_t s_menuFontHeight; 195 static int32_t s_menuFontHeight;
198 static AtomicString* s_smallCaptionFontFamilyName; 196 static AtomicString* s_smallCaptionFontFamilyName;
199 static int32_t s_smallCaptionFontHeight; 197 static int32_t s_smallCaptionFontHeight;
200 static AtomicString* s_statusFontFamilyName; 198 static AtomicString* s_statusFontFamilyName;
201 static int32_t s_statusFontHeight; 199 static int32_t s_statusFontHeight;
202 static bool s_useSkiaFontFallback; 200 static bool s_useSkiaFontFallback;
203 #endif 201 #endif
204 202
205 friend class SimpleFontData; // For fontDataFromFontPlatformData 203 friend class SimpleFontData; // For fontDataFromFontPlatformData
206 friend class FontFallbackList; 204 friend class FontFallbackList;
207 }; 205 };
208 206
209 class PLATFORM_EXPORT FontCachePurgePreventer { 207 class PLATFORM_EXPORT FontCachePurgePreventer {
210 USING_FAST_MALLOC(FontCachePurgePreventer); 208 USING_FAST_MALLOC(FontCachePurgePreventer);
211 WTF_MAKE_NONCOPYABLE(FontCachePurgePreventer); 209 WTF_MAKE_NONCOPYABLE(FontCachePurgePreventer);
212 public: 210 public:
213 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } 211 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); }
214 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } 212 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); }
215 }; 213 };
216 214
217 CString toSkFontMgrLocale(const String& locale); 215 CString toSkFontMgrLocale(const String& locale);
218 216
219 } // namespace blink 217 } // namespace blink
220 218
221 #endif 219 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698