Home | History | Annotate | Download | only in viewer

Lines Matching refs:timer

28 StatsLayer::Timer StatsLayer::addTimer(const char* label, SkColor color, SkColor labelColor) {
29 Timer newTimer = fTimers.count();
38 void StatsLayer::beginTiming(Timer timer) {
39 fTimers[timer].fTimes[fCurrentMeasurement] -= SkTime::GetMSecs();
42 void StatsLayer::endTiming(Timer timer) {
43 fTimers[timer].fTimes[fCurrentMeasurement] += SkTime::GetMSecs();
46 double StatsLayer::getLastTime(Timer timer) {
48 return fTimers[timer].fTimes[idx];
102 for (int timer = 0; timer < fTimers.count(); ++timer) {
103 int height = (int)(fTimers[timer].fTimes[i] * kPixelPerMS + 0.5);
105 paint.setColor(fTimers[timer].fColor);
109 inc += fTimers[timer].fTimes[i];
110 sumTimes[timer] += fTimers[timer].fTimes[i];
130 for (int timer = 0; timer < fTimers.count(); ++timer) {
132 str.appendf("%s: %4.3f ms", fTimers[timer].fLabel.c_str(),
133 sumTimes[timer] / SkTMax(1, count));
134 paint.setColor(fTimers[timer].fLabelColor);
135 canvas->drawString(str, rect.fLeft + 3, rect.fTop + 28 + (14 * timer), paint);