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

Side by Side Diff: bench/TimerData.cpp

Issue 303913002: In Android framework, make tools depend on jsoncpp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Do as Thoreau would do. Created 6 years, 6 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 | « bench/TimerData.h ('k') | bench/benchmain.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "TimerData.h" 8 #include "TimerData.h"
9 9
10 #include "BenchTimer.h" 10 #include "BenchTimer.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 if (timerFlags & kTruncatedCpu_Flag) { 134 if (timerFlags & kTruncatedCpu_Flag) {
135 str += truncCpuStr; 135 str += truncCpuStr;
136 } 136 }
137 if ((timerFlags & kGpu_Flag) && gpuSum > 0) { 137 if ((timerFlags & kGpu_Flag) && gpuSum > 0) {
138 str += gpuStr; 138 str += gpuStr;
139 } 139 }
140 return str; 140 return str;
141 } 141 }
142 142
143 #ifdef SK_BUILD_JSON_WRITER
144 Json::Value TimerData::getJSON(uint32_t timerFlags, 143 Json::Value TimerData::getJSON(uint32_t timerFlags,
145 Result result, 144 Result result,
146 int itersPerTiming) { 145 int itersPerTiming) {
147 SkASSERT(itersPerTiming >= 1); 146 SkASSERT(itersPerTiming >= 1);
148 Json::Value dataNode; 147 Json::Value dataNode;
149 Json::Value wallNode, truncWall, cpuNode, truncCpu, gpuNode; 148 Json::Value wallNode, truncWall, cpuNode, truncCpu, gpuNode;
150 if (!fCurrTiming) { 149 if (!fCurrTiming) {
151 return dataNode; 150 return dataNode;
152 } 151 }
153 152
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 dataNode["cpu"] = cpuNode; 215 dataNode["cpu"] = cpuNode;
217 } 216 }
218 if (timerFlags & kTruncatedCpu_Flag) { 217 if (timerFlags & kTruncatedCpu_Flag) {
219 dataNode["trucCpu"] = truncCpu; 218 dataNode["trucCpu"] = truncCpu;
220 } 219 }
221 if ((timerFlags & kGpu_Flag) && gpuSum > 0) { 220 if ((timerFlags & kGpu_Flag) && gpuSum > 0) {
222 dataNode["gpu"] = gpuNode; 221 dataNode["gpu"] = gpuNode;
223 } 222 }
224 return dataNode; 223 return dataNode;
225 } 224 }
226 #endif // SK_BUILD_JSON_WRITER
OLDNEW
« no previous file with comments | « bench/TimerData.h ('k') | bench/benchmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698