aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tools/PictureBenchmark.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp
index b6a927b42b..a26cecd684 100644
--- a/tools/PictureBenchmark.cpp
+++ b/tools/PictureBenchmark.cpp
@@ -104,7 +104,12 @@ 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());
+ //
+ // Although "legal", having two gpu timers running at the same time
+ // 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<BenchTimer> longRunningTimer(this->setupTimer(false));
TimerData longRunningTimerData(tiledRenderer->getPerIterTimeFormat(),
tiledRenderer->getNormalTimeFormat());
SkAutoTDelete<BenchTimer> perTileTimer(this->setupTimer());