| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/fonts/FontFallbackIterator.h" | 5 #include "platform/fonts/FontFallbackIterator.h" |
| 6 | 6 |
| 7 #include "platform/fonts/FontCache.h" | 7 #include "platform/fonts/FontCache.h" |
| 8 #include "platform/fonts/FontDescription.h" | 8 #include "platform/fonts/FontDescription.h" |
| 9 #include "platform/fonts/FontFallbackList.h" | 9 #include "platform/fonts/FontFallbackList.h" |
| 10 #include "platform/fonts/SegmentedFontData.h" | 10 #include "platform/fonts/SegmentedFontData.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 m_fallbackStage = FontGroupFonts; | 172 m_fallbackStage = FontGroupFonts; |
| 173 m_currentFontDataIndex++; | 173 m_currentFontDataIndex++; |
| 174 } | 174 } |
| 175 | 175 |
| 176 if (rangeSetContributesForHint(hintList, currentSegmentedFace.get())) { | 176 if (rangeSetContributesForHint(hintList, currentSegmentedFace.get())) { |
| 177 const SimpleFontData* fontData = currentSegmentedFace->fontData(); | 177 const SimpleFontData* fontData = currentSegmentedFace->fontData(); |
| 178 if (const CustomFontData* customFontData = fontData->customFontData()) | 178 if (const CustomFontData* customFontData = fontData->customFontData()) |
| 179 customFontData->beginLoadIfNeeded(); | 179 customFontData->beginLoadIfNeeded(); |
| 180 if (!fontData->isLoading()) | 180 if (!fontData->isLoading()) |
| 181 return uniqueOrNext(currentSegmentedFace, hintList); | 181 return uniqueOrNext(currentSegmentedFace, hintList); |
| 182 m_trackedLoadingRangeSets.append(currentSegmentedFace); | 182 m_trackedLoadingRangeSets.push_back(currentSegmentedFace); |
| 183 } | 183 } |
| 184 | 184 |
| 185 return next(hintList); | 185 return next(hintList); |
| 186 } | 186 } |
| 187 | 187 |
| 188 PassRefPtr<SimpleFontData> FontFallbackIterator::fallbackPriorityFont( | 188 PassRefPtr<SimpleFontData> FontFallbackIterator::fallbackPriorityFont( |
| 189 UChar32 hint) { | 189 UChar32 hint) { |
| 190 return FontCache::fontCache()->fallbackFontForCharacter( | 190 return FontCache::fontCache()->fallbackFontForCharacter( |
| 191 m_fontDescription, hint, | 191 m_fontDescription, hint, |
| 192 m_fontFallbackList->primarySimpleFontData(m_fontDescription), | 192 m_fontFallbackList->primarySimpleFontData(m_fontDescription), |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 if (!hint || m_previouslyAskedForHint.contains(hint)) | 235 if (!hint || m_previouslyAskedForHint.contains(hint)) |
| 236 return nullptr; | 236 return nullptr; |
| 237 m_previouslyAskedForHint.add(hint); | 237 m_previouslyAskedForHint.add(hint); |
| 238 return fontCache->fallbackFontForCharacter( | 238 return fontCache->fallbackFontForCharacter( |
| 239 m_fontDescription, hint, | 239 m_fontDescription, hint, |
| 240 m_fontFallbackList->primarySimpleFontData(m_fontDescription)); | 240 m_fontFallbackList->primarySimpleFontData(m_fontDescription)); |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace blink | 243 } // namespace blink |
| OLD | NEW |