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

Unified Diff: tools/PictureBenchmark.cpp

Issue 346753003: Revert of Move BenchTimer to tools as Timer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/PictureBenchmark.h ('k') | tools/bbh_shootout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureBenchmark.cpp
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp
index 85a49f4e5e748c7c66cb0ab5100e0a8924ea23ac..30967c738141d83f3583f4e257ce089e38931e40 100644
--- a/tools/PictureBenchmark.cpp
+++ b/tools/PictureBenchmark.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "Timer.h"
+#include "BenchTimer.h"
#include "PictureBenchmark.h"
#include "SkCanvas.h"
#include "SkPicture.h"
@@ -42,13 +42,13 @@
fTimerTypes |= gpu ? TimerData::kGpu_Flag : 0;
}
-Timer* PictureBenchmark::setupTimer(bool useGLTimer) {
+BenchTimer* PictureBenchmark::setupTimer(bool useGLTimer) {
#if SK_SUPPORT_GPU
if (useGLTimer && fRenderer != NULL && fRenderer->isUsingGpuDevice()) {
- return SkNEW_ARGS(Timer, (fRenderer->getGLContext()));
- }
-#endif
- return SkNEW_ARGS(Timer, (NULL));
+ return SkNEW_ARGS(BenchTimer, (fRenderer->getGLContext()));
+ }
+#endif
+ return SkNEW_ARGS(BenchTimer, (NULL));
}
PictureRenderer* PictureBenchmark::setRenderer(sk_tools::PictureRenderer* renderer) {
@@ -147,11 +147,11 @@
// seems to cause problems (i.e., INVALID_OPERATIONs) on several
// platforms. To work around this, we disable the gpu timer on the
// long running timer.
- SkAutoTDelete<Timer> longRunningTimer(this->setupTimer());
+ SkAutoTDelete<BenchTimer> longRunningTimer(this->setupTimer());
TimerData longRunningTimerData(numOuterLoops);
for (int outer = 0; outer < numOuterLoops; ++outer) {
- SkAutoTDelete<Timer> perTileTimer(this->setupTimer(false));
+ SkAutoTDelete<BenchTimer> perTileTimer(this->setupTimer(false));
TimerData perTileTimerData(numInnerLoops);
longRunningTimer->start();
@@ -201,11 +201,11 @@
numInnerLoops);
}
} else {
- SkAutoTDelete<Timer> longRunningTimer(this->setupTimer());
+ SkAutoTDelete<BenchTimer> longRunningTimer(this->setupTimer());
TimerData longRunningTimerData(numOuterLoops);
for (int outer = 0; outer < numOuterLoops; ++outer) {
- SkAutoTDelete<Timer> perRunTimer(this->setupTimer(false));
+ SkAutoTDelete<BenchTimer> perRunTimer(this->setupTimer(false));
TimerData perRunTimerData(numInnerLoops);
longRunningTimer->start();
« no previous file with comments | « tools/PictureBenchmark.h ('k') | tools/bbh_shootout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698