OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 recordPackageFormatHistogram(PackageFormatUnknown); | 143 recordPackageFormatHistogram(PackageFormatUnknown); |
144 } | 144 } |
145 } | 145 } |
146 return m_fontData.get(); | 146 return m_fontData.get(); |
147 } | 147 } |
148 | 148 |
149 FontPlatformData FontResource::platformDataFromCustomData( | 149 FontPlatformData FontResource::platformDataFromCustomData( |
150 float size, | 150 float size, |
151 bool bold, | 151 bool bold, |
152 bool italic, | 152 bool italic, |
153 FontOrientation orientation) { | 153 FontOrientation orientation, |
| 154 FontVariationSettings* fontVariationSettings) { |
154 DCHECK(m_fontData); | 155 DCHECK(m_fontData); |
155 return m_fontData->fontPlatformData(size, bold, italic, orientation); | 156 return m_fontData->fontPlatformData(size, bold, italic, orientation, |
| 157 fontVariationSettings); |
156 } | 158 } |
157 | 159 |
158 void FontResource::willReloadAfterDiskCacheMiss() { | 160 void FontResource::willReloadAfterDiskCacheMiss() { |
159 DCHECK(isLoading()); | 161 DCHECK(isLoading()); |
160 DCHECK(loader()->isCacheAwareLoadingActivated()); | 162 DCHECK(loader()->isCacheAwareLoadingActivated()); |
161 if (m_loadLimitState == ShortLimitExceeded || | 163 if (m_loadLimitState == ShortLimitExceeded || |
162 m_loadLimitState == LongLimitExceeded) { | 164 m_loadLimitState == LongLimitExceeded) { |
163 notifyClientsShortLimitExceeded(); | 165 notifyClientsShortLimitExceeded(); |
164 } | 166 } |
165 if (m_loadLimitState == LongLimitExceeded) | 167 if (m_loadLimitState == LongLimitExceeded) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 Resource::onMemoryDump(level, memoryDump); | 238 Resource::onMemoryDump(level, memoryDump); |
237 if (!m_fontData) | 239 if (!m_fontData) |
238 return; | 240 return; |
239 const String name = getMemoryDumpName() + "/decoded_webfont"; | 241 const String name = getMemoryDumpName() + "/decoded_webfont"; |
240 WebMemoryAllocatorDump* dump = memoryDump->createMemoryAllocatorDump(name); | 242 WebMemoryAllocatorDump* dump = memoryDump->createMemoryAllocatorDump(name); |
241 dump->addScalar("size", "bytes", m_fontData->dataSize()); | 243 dump->addScalar("size", "bytes", m_fontData->dataSize()); |
242 memoryDump->addSuballocation(dump->guid(), "malloc"); | 244 memoryDump->addSuballocation(dump->guid(), "malloc"); |
243 } | 245 } |
244 | 246 |
245 } // namespace blink | 247 } // namespace blink |
OLD | NEW |