OLD | NEW |
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 | 7 |
8 #include "Timer.h" | 8 #include "Timer.h" |
9 #include "PictureBenchmark.h" | 9 #include "PictureBenchmark.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 if (fPurgeDecodedTex) { | 166 if (fPurgeDecodedTex) { |
167 fRenderer->purgeTextures(); | 167 fRenderer->purgeTextures(); |
168 } | 168 } |
169 } | 169 } |
170 longRunningTimer->truncatedEnd(); | 170 longRunningTimer->truncatedEnd(); |
171 tiledRenderer->resetState(true); // flush, swapBuffers and
Finish | 171 tiledRenderer->resetState(true); // flush, swapBuffers and
Finish |
172 longRunningTimer->end(); | 172 longRunningTimer->end(); |
173 SkAssertResult(longRunningTimerData.appendTimes(longRunningTimer
.get())); | 173 SkAssertResult(longRunningTimerData.appendTimes(longRunningTimer
.get())); |
174 } | 174 } |
175 | 175 |
176 fWriter->tileConfig(tiledRenderer->getConfigName()); | 176 fWriter->logRenderer(tiledRenderer); |
177 fWriter->tileMeta(x, y, xTiles, yTiles); | 177 fWriter->tileMeta(x, y, xTiles, yTiles); |
178 | 178 |
179 // TODO(borenet): Turn off per-iteration tile time reporting for now
. | 179 // TODO(borenet): Turn off per-iteration tile time reporting for now
. |
180 // Avoiding logging the time for every iteration for each tile cuts | 180 // Avoiding logging the time for every iteration for each tile cuts |
181 // down on data file size by a significant amount. Re-enable this on
ce | 181 // down on data file size by a significant amount. Re-enable this on
ce |
182 // we're loading the bench data directly into a data store and are n
o | 182 // we're loading the bench data directly into a data store and are n
o |
183 // longer generating SVG graphs. | 183 // longer generating SVG graphs. |
184 #if 0 | 184 #if 0 |
185 fWriter->tileData( | 185 fWriter->tileData( |
186 &perTileTimerData, | 186 &perTileTimerData, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 if (fPurgeDecodedTex) { | 229 if (fPurgeDecodedTex) { |
230 fRenderer->purgeTextures(); | 230 fRenderer->purgeTextures(); |
231 } | 231 } |
232 } | 232 } |
233 longRunningTimer->truncatedEnd(); | 233 longRunningTimer->truncatedEnd(); |
234 fRenderer->resetState(true); // flush, swapBuffers and Finish | 234 fRenderer->resetState(true); // flush, swapBuffers and Finish |
235 longRunningTimer->end(); | 235 longRunningTimer->end(); |
236 SkAssertResult(longRunningTimerData.appendTimes(longRunningTimer.get
())); | 236 SkAssertResult(longRunningTimerData.appendTimes(longRunningTimer.get
())); |
237 } | 237 } |
238 | 238 |
239 fWriter->tileConfig(fRenderer->getConfigName()); | 239 fWriter->logRenderer(fRenderer); |
240 if (fPurgeDecodedTex) { | 240 if (fPurgeDecodedTex) { |
241 fWriter->addTileFlag(PictureResultsWriter::kPurging); | 241 fWriter->addTileFlag(PictureResultsWriter::kPurging); |
242 } | 242 } |
243 | 243 |
244 // Beware - since the per-run-timer doesn't ever include a glFinish it c
an | 244 // Beware - since the per-run-timer doesn't ever include a glFinish it c
an |
245 // report a lower time then the long-running-timer | 245 // report a lower time then the long-running-timer |
246 #if 0 | 246 #if 0 |
247 fWriter->tileData( | 247 fWriter->tileData( |
248 &perRunTimerData, | 248 &perRunTimerData, |
249 timeFormat.c_str(), | 249 timeFormat.c_str(), |
250 fTimerResult, | 250 fTimerResult, |
251 timerTypes); | 251 timerTypes); |
252 #else | 252 #else |
253 fWriter->tileData( | 253 fWriter->tileData( |
254 &longRunningTimerData, | 254 &longRunningTimerData, |
255 timeFormat.c_str(), | 255 timeFormat.c_str(), |
256 fTimerResult, | 256 fTimerResult, |
257 timerTypes, | 257 timerTypes, |
258 numInnerLoops); | 258 numInnerLoops); |
259 #endif | 259 #endif |
260 } | 260 } |
261 | 261 |
262 fRenderer->end(); | 262 fRenderer->end(); |
263 } | 263 } |
264 | 264 |
265 } | 265 } |
OLD | NEW |