OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Benchmark.h" | 8 #include "Benchmark.h" |
9 #include "SkGraphics.h" | 9 #include "SkGraphics.h" |
| 10 #include "SkTaskGroup.h" |
10 #include <algorithm> | 11 #include <algorithm> |
11 #include <chrono> | 12 #include <chrono> |
12 #include <regex> | 13 #include <regex> |
13 #include <stdio.h> | 14 #include <stdio.h> |
14 #include <string> | 15 #include <string> |
15 #include <vector> | 16 #include <vector> |
16 | 17 |
17 int main(int argc, char** argv) { | 18 int main(int argc, char** argv) { |
18 SkGraphics::Init(); | 19 SkGraphics::Init(); |
| 20 SkTaskGroup::Enabler enabled; |
19 | 21 |
20 using clock = std::chrono::high_resolution_clock; | 22 using clock = std::chrono::high_resolution_clock; |
21 using ns = std::chrono::duration<double, std::nano>; | 23 using ns = std::chrono::duration<double, std::nano>; |
22 | 24 |
23 std::regex pattern; | 25 std::regex pattern; |
24 if (argc > 1) { | 26 if (argc > 1) { |
25 pattern = argv[1]; | 27 pattern = argv[1]; |
26 } | 28 } |
27 | 29 |
28 struct Bench { | 30 struct Bench { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 107 } |
106 } | 108 } |
107 fflush(stdout); | 109 fflush(stdout); |
108 break; | 110 break; |
109 } | 111 } |
110 } | 112 } |
111 } | 113 } |
112 | 114 |
113 return 0; | 115 return 0; |
114 } | 116 } |
OLD | NEW |