| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 if (NULL == fRenderer) { | 66 if (NULL == fRenderer) { |
| 67 return; | 67 return; |
| 68 } | 68 } |
| 69 | 69 |
| 70 fRenderer->init(pict, NULL, NULL, NULL, false); | 70 fRenderer->init(pict, NULL, NULL, NULL, false); |
| 71 | 71 |
| 72 // We throw this away to remove first time effects (such as paging in this p
rogram) | 72 // We throw this away to remove first time effects (such as paging in this p
rogram) |
| 73 fRenderer->setup(); | 73 fRenderer->setup(); |
| 74 | 74 |
| 75 if (fPreprocess) { | 75 if (fPreprocess) { |
| 76 if (NULL != fRenderer->getCanvas()) { | 76 if (fRenderer->getCanvas()) { |
| 77 fRenderer->getCanvas()->EXPERIMENTAL_optimize(fRenderer->getPicture(
)); | 77 fRenderer->getCanvas()->EXPERIMENTAL_optimize(fRenderer->getPicture(
)); |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 fRenderer->render(NULL); | 81 fRenderer->render(NULL); |
| 82 fRenderer->resetState(true); // flush, swapBuffers and Finish | 82 fRenderer->resetState(true); // flush, swapBuffers and Finish |
| 83 | 83 |
| 84 if (fPurgeDecodedTex) { | 84 if (fPurgeDecodedTex) { |
| 85 fRenderer->purgeTextures(); | 85 fRenderer->purgeTextures(); |
| 86 } | 86 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 fTimerResult, | 244 fTimerResult, |
| 245 timerTypes, | 245 timerTypes, |
| 246 numInnerLoops); | 246 numInnerLoops); |
| 247 #endif | 247 #endif |
| 248 } | 248 } |
| 249 | 249 |
| 250 fRenderer->end(); | 250 fRenderer->end(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } | 253 } |
| OLD | NEW |