diff options
author | 2013-02-07 20:20:27 +0000 | |
---|---|---|
committer | 2013-02-07 20:20:27 +0000 | |
commit | 9b63c50d72cc65c75f7dfe3147a489536ae019f9 (patch) | |
tree | c34092dd8355535e12d1a13810f89f56e6553dc0 | |
parent | 51ac7e6d97d7f92ffb4b29b867dba1089836e0cb (diff) |
Only turn on one gpu timer in PictureBenchmark tool
https://codereview.appspot.com/7310060/
git-svn-id: http://skia.googlecode.com/svn/trunk@7651 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | tools/PictureBenchmark.cpp | 7 |
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()); |