Lines Matching defs:strike
22 static bool LessThan(const GrTextStrike& strike, const Key& key) {
23 return *strike.getFontScalerKey() < *key.fFontScalerKey;
25 static bool Equals(const GrTextStrike& strike, const Key& key) {
26 return *strike.getFontScalerKey() == *key.fFontScalerKey;
33 void GrFontCache::detachStrikeFromList(GrTextStrike* strike) {
34 if (strike->fPrev) {
35 SkASSERT(fHead != strike);
36 strike->fPrev->fNext = strike->fNext;
38 SkASSERT(fHead == strike);
39 fHead = strike->fNext;
42 if (strike->fNext) {
43 SkASSERT(fTail != strike);
44 strike->fNext->fPrev = strike->fPrev;
46 SkASSERT(fTail == strike);
47 fTail = strike->fPrev;
55 GrTextStrike* strike = fCache.find(key);
56 if (NULL == strike) {
57 strike = this->generateStrike(scaler, key);
58 } else if (strike->fPrev) {
59 // Need to put the strike at the head of its dllist, since that is how
61 this->detachStrikeFromList(strike);
63 fHead->fPrev = strike;
64 strike->fNext = fHead;
65 strike->fPrev = NULL;
66 fHead = strike;
68 strike->fUseDistanceField = useDistanceField;
70 return strike;