Lines Matching refs:index
40 int index; in find_simple() local
41 for (index = 0;; ++index) { in find_simple()
42 if (value <= base[index]) { in find_simple()
43 if (value < base[index]) { in find_simple()
44 index = ~index; // not found in find_simple()
49 return index; in find_simple()
55 int index; in find_with_slope() local
57 index = 1; in find_with_slope()
58 if (value < base[index]) { in find_with_slope()
59 index = ~index; in find_with_slope()
62 index = count - 2; in find_with_slope()
63 if (value > base[index]) { in find_with_slope()
64 index = ~(index + 1); in find_with_slope()
69 index = 1 + (int)(denom * (count - 2) * (value - base[1])); in find_with_slope()
70 SkASSERT(index >= 1 && index <= count - 2); in find_with_slope()
72 if (value >= base[index]) { in find_with_slope()
73 for (;; ++index) { in find_with_slope()
74 if (value <= base[index]) { in find_with_slope()
75 if (value < base[index]) { in find_with_slope()
76 index = ~index; // not found in find_with_slope()
82 for (--index;; --index) { in find_with_slope()
83 SkASSERT(index >= 0); in find_with_slope()
84 if (value >= base[index]) { in find_with_slope()
85 if (value > base[index]) { in find_with_slope()
86 index = ~(index + 1); in find_with_slope()
93 return index; in find_with_slope()
98 int index; in findGlyphIndex() local
100 index = find_simple(fK32.begin(), count, unichar); in findGlyphIndex()
102 index = find_with_slope(fK32.begin(), count, unichar, fDenom); in findGlyphIndex()
104 if (index >= 0) { in findGlyphIndex()
105 return fV16[index]; in findGlyphIndex()
107 return index; in findGlyphIndex()
110 void SkCharToGlyphCache::insertCharAndGlyph(int index, SkUnichar unichar, SkGlyphID glyph) { in insertCharAndGlyph() argument
112 SkASSERT((unsigned)index < fK32.size()); in insertCharAndGlyph()
113 SkASSERT(unichar < fK32[index]); in insertCharAndGlyph()
115 *fK32.insert(index) = unichar; in insertCharAndGlyph()
116 *fV16.insert(index) = glyph; in insertCharAndGlyph()
120 if (count >= kMinCountForSlope && (index == 1 || index == count - 2)) { in insertCharAndGlyph()
121 SkASSERT(index >= 1 && index <= count - 2); in insertCharAndGlyph()