OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "ui/gfx/font_fallback_linux.h" | 32 #include "ui/gfx/font_fallback_linux.h" |
33 #include "wtf/text/CString.h" | 33 #include "wtf/text/CString.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 FontCache::FontCache() | 37 FontCache::FontCache() |
38 : m_purgePreventCount(0) | 38 : m_purgePreventCount(0) |
39 { | 39 { |
40 if (s_staticFontManager) { | 40 if (s_staticFontManager) { |
41 adopted(s_staticFontManager); | 41 adopted(s_staticFontManager); |
42 m_fontManager = s_staticFontManager; | 42 m_fontManager = sk_ref_sp(s_staticFontManager); |
43 } else { | 43 } else { |
44 m_fontManager = nullptr; | 44 m_fontManager = nullptr; |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 void FontCache::getFontForCharacter(UChar32 c, const char* preferredLocale, Font
Cache::PlatformFallbackFont* fallbackFont) | 48 void FontCache::getFontForCharacter(UChar32 c, const char* preferredLocale, Font
Cache::PlatformFallbackFont* fallbackFont) |
49 { | 49 { |
50 if (Platform::current()->sandboxSupport()) { | 50 if (Platform::current()->sandboxSupport()) { |
51 WebFallbackFont webFallbackFont; | 51 WebFallbackFont webFallbackFont; |
52 Platform::current()->sandboxSupport()->getFallbackFontForCharacter(c, pr
eferredLocale, &webFallbackFont); | 52 Platform::current()->sandboxSupport()->getFallbackFontForCharacter(c, pr
eferredLocale, &webFallbackFont); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 std::unique_ptr<FontPlatformData> platformData(new FontPlatformData(*substit
utePlatformData)); | 138 std::unique_ptr<FontPlatformData> platformData(new FontPlatformData(*substit
utePlatformData)); |
139 platformData->setSyntheticBold(shouldSetSyntheticBold); | 139 platformData->setSyntheticBold(shouldSetSyntheticBold); |
140 platformData->setSyntheticItalic(shouldSetSyntheticItalic); | 140 platformData->setSyntheticItalic(shouldSetSyntheticItalic); |
141 return fontDataFromFontPlatformData(platformData.get(), DoNotRetain); | 141 return fontDataFromFontPlatformData(platformData.get(), DoNotRetain); |
142 } | 142 } |
143 | 143 |
144 #endif // !OS(ANDROID) | 144 #endif // !OS(ANDROID) |
145 | 145 |
146 } // namespace blink | 146 } // namespace blink |
OLD | NEW |