diff options
author | Yuqian Li <liyuqian@google.com> | 2017-09-14 07:49:41 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-14 15:09:51 +0000 |
commit | d29f0e7ccb84993562f34f2d8e3933a19a3ed676 (patch) | |
tree | 36016128a81a1d5f6b363eb408aa1e929d3d8338 /bench | |
parent | ed294b4e00a5a5155445d4e877a4a10f9cddc85d (diff) |
Do not divide loops in PathBench
That breaks the assumption that the work is proportional to loops.
For example, loops = 5 and loops = 7 would result in the same count
if count = loops / 4.
Bug: skia:
Change-Id: Idae86d658cbfba8a7f49b983ed61a8b7fbea007a
Reviewed-on: https://skia-review.googlesource.com/46600
Commit-Queue: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'bench')
-rw-r--r-- | bench/PathBench.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp index 757ffcc198..964a0e8c6d 100644 --- a/bench/PathBench.cpp +++ b/bench/PathBench.cpp @@ -62,13 +62,7 @@ protected: path.transform(m); } - int count = loops; - if (fFlags & kBig_Flag) { - count >>= 2; - } - count >>= (3 * complexity()); - - for (int i = 0; i < SkTMax(1, count); i++) { + for (int i = 0; i < loops; i++) { canvas->drawPath(path, paint); } } |