Lines Matching refs:range

59         AdvanceMetric* range) {  in strip_uninteresting_trailing_advances_from_range()  argument
60 SkASSERT(range); in strip_uninteresting_trailing_advances_from_range()
62 int expectedAdvanceCount = range->fEndId - range->fStartId + 1; in strip_uninteresting_trailing_advances_from_range()
63 if (SkToInt(range->fAdvance.size()) < expectedAdvanceCount) { in strip_uninteresting_trailing_advances_from_range()
68 if (range->fAdvance[i] != kDontCareAdvance && in strip_uninteresting_trailing_advances_from_range()
69 range->fAdvance[i] != kInvalidAdvance && in strip_uninteresting_trailing_advances_from_range()
70 range->fAdvance[i] != 0) { in strip_uninteresting_trailing_advances_from_range()
71 range->fEndId = range->fStartId + i; in strip_uninteresting_trailing_advances_from_range()
77 static void zero_wildcards_in_range(AdvanceMetric* range) { in zero_wildcards_in_range() argument
78 SkASSERT(range); in zero_wildcards_in_range()
79 if (range->fType != AdvanceMetric::kRange) { in zero_wildcards_in_range()
82 SkASSERT(SkToInt(range->fAdvance.size()) == range->fEndId - range->fStartId + 1); in zero_wildcards_in_range()
85 for (size_t i = 0; i < range->fAdvance.size(); ++i) { in zero_wildcards_in_range()
86 if (range->fAdvance[i] == kDontCareAdvance) { in zero_wildcards_in_range()
87 range->fAdvance[i] = 0; in zero_wildcards_in_range()
93 AdvanceMetric* range, in finish_range() argument
96 range->fEndId = endId; in finish_range()
97 range->fType = type; in finish_range()
98 strip_uninteresting_trailing_advances_from_range(range); in finish_range()
101 newLength = range->fEndId - range->fStartId + 1; in finish_range()
103 if (range->fEndId == range->fStartId) { in finish_range()
104 range->fType = AdvanceMetric::kRange; in finish_range()
108 SkASSERT(range->fAdvance.size() >= newLength); in finish_range()
109 range->fAdvance.resize(newLength); in finish_range()
110 zero_wildcards_in_range(range); in finish_range()
113 static void compose_advance_data(const AdvanceMetric& range, in compose_advance_data() argument
117 switch (range.fType) { in compose_advance_data()
119 SkASSERT(range.fAdvance.size() == 1); in compose_advance_data()
120 *defaultAdvance = range.fAdvance[0]; in compose_advance_data()
125 for (size_t j = 0; j < range.fAdvance.size(); j++) in compose_advance_data()
127 scale_from_font_units(range.fAdvance[j], emSize)); in compose_advance_data()
128 result->appendInt(range.fStartId); in compose_advance_data()
133 SkASSERT(range.fAdvance.size() == 1); in compose_advance_data()
134 result->appendInt(range.fStartId); in compose_advance_data()
135 result->appendInt(range.fEndId); in compose_advance_data()
137 scale_from_font_units(range.fAdvance[0], emSize)); in compose_advance_data()