Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: tools/monobench.cpp

Issue 2139423002: Enable SkTaskGroup threading in monobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698