Lines Matching refs:index
88 uint32_t index = static_cast<uint32_t>(ns2ms(frameTime));
89 // If index > kBucketMinThreshold mask will be 0xFFFFFFFF as a result
91 uint32_t mask = -(index > kBucketMinThreshold);
92 // If index > threshold, this will essentially perform:
93 // amountAboveThreshold = index - threshold;
94 // index = threshold + (amountAboveThreshold / 2)
95 // However if index is <= this will do nothing. It will underflow, do
97 index = ((index - kBucket4msIntervals) >> (index > kBucket4msIntervals))
99 index = ((index - kBucket2msIntervals) >> (index > kBucket2msIntervals))
101 // If index was < minThreshold at the start of all this it's going to
104 index = (index - kBucketMinThreshold) & mask;
105 return index;
109 static uint32_t frameTimeForFrameCountIndex(uint32_t index) {
110 index = index + kBucketMinThreshold;
111 if (index > kBucket2msIntervals) {
112 index += (index - kBucket2msIntervals);
114 if (index > kBucket4msIntervals) {
117 index += (index - kBucket4msIntervals) + 1;
119 return index;