// Add sentinels so we can always rely on these to stop linear searches (in either direction) // Neither is a legal unichar, so we don't care what glyphID we use. //
*fK32.append() = 0x80000000; *fV16.append() = 0;
*fK32.append() = 0x7FFFFFFF; *fV16.append() = 0;
fDenom = 0;
}
// Determined experimentally. For N much larger, the slope technique is faster. // For N much smaller, a simple search is faster. //
constexpr int kSmallCountLimit = 16;
// To use slope technique we need at least 2 real entries (+2 sentinels) hence the min of 4 //
constexpr int kMinCountForSlope = 4;
staticint find_simple(const SkUnichar base[], int count, SkUnichar value) { int index; for (index = 0;; ++index) { if (value <= base[index]) { if (value < base[index]) {
index = ~index; // not found
} break;
}
} return index;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.