OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "Timer.h" | 7 #include "Timer.h" |
8 | 8 |
9 Timer::Timer(SkGLContext* gl) | 9 Timer::Timer(SkGLContextHelper* gl) |
10 : fCpu(-1.0) | 10 : fCpu(-1.0) |
11 , fWall(-1.0) | 11 , fWall(-1.0) |
12 , fTruncatedCpu(-1.0) | 12 , fTruncatedCpu(-1.0) |
13 , fTruncatedWall(-1.0) | 13 , fTruncatedWall(-1.0) |
14 , fGpu(-1.0) | 14 , fGpu(-1.0) |
15 #if SK_SUPPORT_GPU | 15 #if SK_SUPPORT_GPU |
16 , fGpuTimer(gl) | 16 , fGpuTimer(gl) |
17 #endif | 17 #endif |
18 {} | 18 {} |
19 | 19 |
(...skipping 24 matching lines...) Expand all Loading... |
44 | 44 |
45 WallTimer::WallTimer() : fWall(-1.0) {} | 45 WallTimer::WallTimer() : fWall(-1.0) {} |
46 | 46 |
47 void WallTimer::start() { | 47 void WallTimer::start() { |
48 fSysTimer.startWall(); | 48 fSysTimer.startWall(); |
49 } | 49 } |
50 | 50 |
51 void WallTimer::end() { | 51 void WallTimer::end() { |
52 fWall = fSysTimer.endWall(); | 52 fWall = fSysTimer.endWall(); |
53 } | 53 } |
OLD | NEW |