| * Copyright 2011 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| Timer::Timer(SkGLContextHelper* gl) |
| fTruncatedSysTimer.startWall(); |
| fTruncatedSysTimer.startCpu(); |
| fCpu = fSysTimer.endCpu(); |
| //It is important to stop the cpu clocks first, |
| //as the following will cpu wait for the gpu to finish. |
| fWall = fSysTimer.endWall(); |
| void Timer::truncatedEnd() { |
| fTruncatedCpu = fTruncatedSysTimer.endCpu(); |
| fTruncatedWall = fTruncatedSysTimer.endWall(); |
| WallTimer::WallTimer() : fWall(-1.0) {} |
| void WallTimer::start() { |
| fWall = fSysTimer.endWall(); |