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

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

Issue 48113009: Move Font related classes to Source/platform/fonts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix mac export Created 7 years, 1 month 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/core/platform/graphics/Font.h ('k') | Source/core/platform/graphics/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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 static AtomicString getGenericFamilyNameForScript(const AtomicString& family Name, UScriptCode); 110 static AtomicString getGenericFamilyNameForScript(const AtomicString& family Name, UScriptCode);
111 #else 111 #else
112 struct SimpleFontFamily { 112 struct SimpleFontFamily {
113 String name; 113 String name;
114 bool isBold; 114 bool isBold;
115 bool isItalic; 115 bool isItalic;
116 }; 116 };
117 static void getFontFamilyForCharacter(UChar32, const char* preferredLocale, SimpleFontFamily*); 117 static void getFontFamilyForCharacter(UChar32, const char* preferredLocale, SimpleFontFamily*);
118 #endif 118 #endif
119 119
120 // Multiplying the floating point size by 100 gives two decimal
121 // point precision which should be sufficient.
122 static const unsigned s_fontSizePrecisionMultiplier = 100;
123
124 private: 120 private:
125 FontCache(); 121 FontCache();
126 ~FontCache(); 122 ~FontCache();
127 123
128 void disablePurging() { m_purgePreventCount++; } 124 void disablePurging() { m_purgePreventCount++; }
129 void enablePurging() 125 void enablePurging()
130 { 126 {
131 ASSERT(m_purgePreventCount); 127 ASSERT(m_purgePreventCount);
132 if (!--m_purgePreventCount) 128 if (!--m_purgePreventCount)
133 purgeInactiveFontDataIfNeeded(); 129 purgeInactiveFontDataIfNeeded();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 162
167 class FontCachePurgePreventer { 163 class FontCachePurgePreventer {
168 public: 164 public:
169 FontCachePurgePreventer() { fontCache()->disablePurging(); } 165 FontCachePurgePreventer() { fontCache()->disablePurging(); }
170 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } 166 ~FontCachePurgePreventer() { fontCache()->enablePurging(); }
171 }; 167 };
172 168
173 } 169 }
174 170
175 #endif 171 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/Font.h ('k') | Source/core/platform/graphics/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698