Lines Matching refs:Timer
31 StatsLayer::Timer StatsLayer::addTimer(const char* label, SkColor color, SkColor labelColor) {
32 Timer newTimer = fTimers.count();
41 void StatsLayer::beginTiming(Timer timer) {
42 fTimers[timer].fTimes[fCurrentMeasurement] -= SkTime::GetMSecs();
45 void StatsLayer::endTiming(Timer timer) {
46 fTimers[timer].fTimes[fCurrentMeasurement] += SkTime::GetMSecs();
49 double StatsLayer::getLastTime(Timer timer) {
51 return fTimers[timer].fTimes[idx];
121 for (int timer = 0; timer < fTimers.count(); ++timer) {
122 int height = (int)(fTimers[timer].fTimes[i] * kPixelPerMS + 0.5);
124 paint.setColor(fTimers[timer].fColor);
128 inc += fTimers[timer].fTimes[i];
129 sumTimes[timer] += fTimers[timer].fTimes[i];
149 for (int timer = 0; timer < fTimers.count(); ++timer) {
150 paint.setColor(fTimers[timer].fLabelColor);
151 canvas->drawString(SkStringPrintf("%s: %4.3f ms", fTimers[timer].fLabel.c_str(),
152 sumTimes[timer] / SkTMax(1, count)),
153 rect.fLeft + 3, rect.fTop + 28 + (14 * timer), font, paint);