OLD | NEW |
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 27 matching lines...) Expand all Loading... |
38 #include "wtf/text/CString.h" | 38 #include "wtf/text/CString.h" |
39 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" |
40 #include "wtf/unicode/Unicode.h" | 40 #include "wtf/unicode/Unicode.h" |
41 | 41 |
42 #if OS(WINDOWS) | 42 #if OS(WINDOWS) |
43 #include <windows.h> | 43 #include <windows.h> |
44 #include <objidl.h> | 44 #include <objidl.h> |
45 #include <mlang.h> | 45 #include <mlang.h> |
46 #endif | 46 #endif |
47 | 47 |
| 48 #if OS(WINDOWS) && !ENABLE(GDI_FONTS_ON_WINDOWS) |
| 49 #include "SkFontMgr.h" |
| 50 #endif |
| 51 |
48 class SkTypeface; | 52 class SkTypeface; |
49 | 53 |
50 namespace WebCore { | 54 namespace WebCore { |
51 | 55 |
52 class Font; | 56 class Font; |
53 class FontPlatformData; | 57 class FontPlatformData; |
54 class FontData; | 58 class FontData; |
55 class FontDescription; | 59 class FontDescription; |
56 class FontSelector; | 60 class FontSelector; |
57 class OpenTypeVerticalData; | 61 class OpenTypeVerticalData; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 136 |
133 // Implemented on skia platforms. | 137 // Implemented on skia platforms. |
134 SkTypeface* createTypeface(const FontDescription&, const AtomicString& famil
y, CString& name); | 138 SkTypeface* createTypeface(const FontDescription&, const AtomicString& famil
y, CString& name); |
135 | 139 |
136 PassRefPtr<SimpleFontData> getFontResourceData(const FontPlatformData*, Shou
ldRetain = Retain); | 140 PassRefPtr<SimpleFontData> getFontResourceData(const FontPlatformData*, Shou
ldRetain = Retain); |
137 const FontPlatformData* getFallbackFontData(const FontDescription&); | 141 const FontPlatformData* getFallbackFontData(const FontDescription&); |
138 | 142 |
139 // Don't purge if this count is > 0; | 143 // Don't purge if this count is > 0; |
140 int m_purgePreventCount; | 144 int m_purgePreventCount; |
141 | 145 |
| 146 #if OS(WINDOWS) && !ENABLE(GDI_FONTS_ON_WINDOWS) |
| 147 OwnPtr<SkFontMgr> m_fontManager; |
| 148 #endif |
| 149 |
142 #if OS(DARWIN) || OS(ANDROID) | 150 #if OS(DARWIN) || OS(ANDROID) |
143 friend class ComplexTextController; | 151 friend class ComplexTextController; |
144 #endif | 152 #endif |
145 friend class SimpleFontData; // For getFontResourceData(const FontPlatformDa
ta*) | 153 friend class SimpleFontData; // For getFontResourceData(const FontPlatformDa
ta*) |
146 friend class FontFallbackList; | 154 friend class FontFallbackList; |
147 }; | 155 }; |
148 | 156 |
149 // Get the global fontCache. | 157 // Get the global fontCache. |
150 FontCache* fontCache(); | 158 FontCache* fontCache(); |
151 | 159 |
152 class FontCachePurgePreventer { | 160 class FontCachePurgePreventer { |
153 public: | 161 public: |
154 FontCachePurgePreventer() { fontCache()->disablePurging(); } | 162 FontCachePurgePreventer() { fontCache()->disablePurging(); } |
155 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } | 163 ~FontCachePurgePreventer() { fontCache()->enablePurging(); } |
156 }; | 164 }; |
157 | 165 |
158 } | 166 } |
159 | 167 |
160 #endif | 168 #endif |
OLD | NEW |