aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-07 20:20:27 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-07 20:20:27 +0000
commit9b63c50d72cc65c75f7dfe3147a489536ae019f9 (patch)
treec34092dd8355535e12d1a13810f89f56e6553dc0 /tools
parent51ac7e6d97d7f92ffb4b29b867dba1089836e0cb (diff)
Only turn on one gpu timer in PictureBenchmark tool
Diffstat (limited to 'tools')
-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());