It looks like we're not always running long enough to give the GPU counters time to converge (and possibly the same for CPU too, but GPU is definitely worse off).

This CL changes our convergence logic from
  - did the last run take more than x milliseconds?
to
  - did the last run take more x milliseconds and are the last two runs within y% of each other?

There's also now an upper limit where we bail out with an error if we haven't yet met the convergence criteria.  Keeping the lower bound is important for benches where the constant overhead is much larger than the work done in the loop; without it we'll see T(1 loop) == T(2 loops) and converge way too early.

This CL also exposed that DeferredCanvasBench had a bug: it was running N^2 loops when we told it to run N.  (My fault.)

I threw in a couple other linty changes that I'd be happy to split off.

BUG=
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/23536046

git-svn-id: http://skia.googlecode.com/svn/trunk@11267 2bbb7eff-a529-9590-31e7-b0007b416f81
2 files changed