Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: tools/timer/TimerData.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/timer/Timer.h ('k') | tools/win_dbghelp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "TimerData.h" 7 #include "TimerData.h"
8 8
9 #include "Timer.h" 9 #include "Timer.h"
10 #include <limits> 10 #include <limits>
11 11
12 TimerData::TimerData(int maxNumTimings) 12 TimerData::TimerData(int maxNumTimings)
13 : fMaxNumTimings(maxNumTimings) 13 : fMaxNumTimings(maxNumTimings)
14 , fCurrTiming(0) 14 , fCurrTiming(0)
15 , fWallTimes(maxNumTimings) 15 , fWallTimes(maxNumTimings)
16 , fTruncatedWallTimes(maxNumTimings) 16 , fTruncatedWallTimes(maxNumTimings)
17 , fCpuTimes(maxNumTimings) 17 , fCpuTimes(maxNumTimings)
18 , fTruncatedCpuTimes(maxNumTimings) 18 , fTruncatedCpuTimes(maxNumTimings)
19 , fGpuTimes(maxNumTimings) {} 19 , fGpuTimes(maxNumTimings) {}
20 20
21 bool TimerData::appendTimes(Timer* timer) { 21 bool TimerData::appendTimes(Timer* timer) {
22 SkASSERT(timer != NULL); 22 SkASSERT(timer != nullptr);
23 if (fCurrTiming >= fMaxNumTimings) { 23 if (fCurrTiming >= fMaxNumTimings) {
24 return false; 24 return false;
25 } 25 }
26 26
27 fWallTimes[fCurrTiming] = timer->fWall; 27 fWallTimes[fCurrTiming] = timer->fWall;
28 fTruncatedWallTimes[fCurrTiming] = timer->fTruncatedWall; 28 fTruncatedWallTimes[fCurrTiming] = timer->fTruncatedWall;
29 fCpuTimes[fCurrTiming] = timer->fCpu; 29 fCpuTimes[fCurrTiming] = timer->fCpu;
30 fTruncatedCpuTimes[fCurrTiming] = timer->fTruncatedCpu; 30 fTruncatedCpuTimes[fCurrTiming] = timer->fTruncatedCpu;
31 fGpuTimes[fCurrTiming] = timer->fGpu; 31 fGpuTimes[fCurrTiming] = timer->fGpu;
32 32
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 dataNode["cpu"] = cpuNode; 211 dataNode["cpu"] = cpuNode;
212 } 212 }
213 if (timerFlags & kTruncatedCpu_Flag) { 213 if (timerFlags & kTruncatedCpu_Flag) {
214 dataNode["trucCpu"] = truncCpu; 214 dataNode["trucCpu"] = truncCpu;
215 } 215 }
216 if ((timerFlags & kGpu_Flag) && gpuSum > 0) { 216 if ((timerFlags & kGpu_Flag) && gpuSum > 0) {
217 dataNode["gpu"] = gpuNode; 217 dataNode["gpu"] = gpuNode;
218 } 218 }
219 return dataNode; 219 return dataNode;
220 } 220 }
OLDNEW
« no previous file with comments | « tools/timer/Timer.h ('k') | tools/win_dbghelp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698