aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-07 16:21:22 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-07 16:21:22 +0000
commitf9d0c95d8ddc2bca7952828201ac369c202bb36b (patch)
treea8809f674a839cfe61fa29d72a27c615aaf4b8df /tools
parentfec0bc3fc13481f5bcb341ab2d2d695911f39bd4 (diff)
Temporary patch to BenchPictures gpu timing problem
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureBenchmark.cpp8
-rw-r--r--tools/PictureBenchmark.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp
index f1be2aafeb..8c1a6ccbab 100644
--- a/tools/PictureBenchmark.cpp
+++ b/tools/PictureBenchmark.cpp
@@ -34,9 +34,9 @@ PictureBenchmark::~PictureBenchmark() {
SkSafeUnref(fRenderer);
}
-BenchTimer* PictureBenchmark::setupTimer() {
+BenchTimer* PictureBenchmark::setupTimer(bool useGLTimer) {
#if SK_SUPPORT_GPU
- if (fRenderer != NULL && fRenderer->isUsingGpuDevice()) {
+ if (useGLTimer && fRenderer != NULL && fRenderer->isUsingGpuDevice()) {
return SkNEW_ARGS(BenchTimer, (fRenderer->getGLContext()));
}
#endif
@@ -104,10 +104,10 @@ void PictureBenchmark::run(SkPicture* pict) {
//
// 2) perTileTimer, along with perTileTimerData, will record each run separately, and
// then take the average. As such, it supports logPerIter and printMin options.
- SkAutoTDelete<BenchTimer> longRunningTimer(this->setupTimer());
+ SkAutoTDelete<BenchTimer> longRunningTimer(this->setupTimer(false));
TimerData longRunningTimerData(tiledRenderer->getPerIterTimeFormat(),
tiledRenderer->getNormalTimeFormat());
- SkAutoTDelete<BenchTimer> perTileTimer(this->setupTimer());
+ SkAutoTDelete<BenchTimer> perTileTimer(this->setupTimer(false));
TimerData perTileTimerData(tiledRenderer->getPerIterTimeFormat(),
tiledRenderer->getNormalTimeFormat());
longRunningTimer->start();
diff --git a/tools/PictureBenchmark.h b/tools/PictureBenchmark.h
index af81f69717..01b4e1d886 100644
--- a/tools/PictureBenchmark.h
+++ b/tools/PictureBenchmark.h
@@ -80,7 +80,7 @@ private:
void logProgress(const char msg[]);
- BenchTimer* setupTimer();
+ BenchTimer* setupTimer(bool useGLTimer = true);
};
}