| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkAdvancedTypefaceMetrics.h" | 10 #include "SkAdvancedTypefaceMetrics.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 if (curRange->fStartId == lastIndex) { | 245 if (curRange->fStartId == lastIndex) { |
| 246 SkASSERT(prevRange); | 246 SkASSERT(prevRange); |
| 247 SkASSERT(prevRange->fNext->fStartId == lastIndex); | 247 SkASSERT(prevRange->fNext->fStartId == lastIndex); |
| 248 prevRange->fNext.free(); | 248 prevRange->fNext.free(); |
| 249 } else { | 249 } else { |
| 250 finishRange(curRange, lastIndex - 1, | 250 finishRange(curRange, lastIndex - 1, |
| 251 SkAdvancedTypefaceMetrics::WidthRange::kRange); | 251 SkAdvancedTypefaceMetrics::WidthRange::kRange); |
| 252 } | 252 } |
| 253 return result.detach(); | 253 return result.release(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 // Make AdvanceMetric template functions available for linking with typename | 256 // Make AdvanceMetric template functions available for linking with typename |
| 257 // WidthRange and VerticalAdvanceRange. | 257 // WidthRange and VerticalAdvanceRange. |
| 258 #if defined(SK_BUILD_FOR_WIN) | 258 #if defined(SK_BUILD_FOR_WIN) |
| 259 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( | 259 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( |
| 260 HDC hdc, | 260 HDC hdc, |
| 261 int num_glyphs, | 261 int num_glyphs, |
| 262 const uint32_t* subsetGlyphIDs, | 262 const uint32_t* subsetGlyphIDs, |
| 263 uint32_t subsetGlyphIDsLength, | 263 uint32_t subsetGlyphIDsLength, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 // additional declaration needed for testing with a face of an unknown type | 309 // additional declaration needed for testing with a face of an unknown type |
| 310 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( | 310 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( |
| 311 void* fontData, | 311 void* fontData, |
| 312 int num_glyphs, | 312 int num_glyphs, |
| 313 const uint32_t* subsetGlyphIDs, | 313 const uint32_t* subsetGlyphIDs, |
| 314 uint32_t subsetGlyphIDsLength, | 314 uint32_t subsetGlyphIDsLength, |
| 315 bool (*getAdvance)(void* fontData, int gId, int16_t* data)); | 315 bool (*getAdvance)(void* fontData, int gId, int16_t* data)); |
| 316 | 316 |
| 317 } // namespace skia_advanced_typeface_metrics_utils | 317 } // namespace skia_advanced_typeface_metrics_utils |
| OLD | NEW |