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

Side by Side Diff: bench/nanobench.cpp

Issue 1229953002: Have nanobench pay attention to --threads. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 2014 Google Inc. 2 * Copyright 2014 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 <ctype.h> 8 #include <ctype.h>
9 9
10 #include "nanobench.h" 10 #include "nanobench.h"
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 int fCurrentColorType; 928 int fCurrentColorType;
929 int fCurrentSubsetType; 929 int fCurrentSubsetType;
930 int fUseCodec; 930 int fUseCodec;
931 int fCurrentAnimSKP; 931 int fCurrentAnimSKP;
932 }; 932 };
933 933
934 int nanobench_main(); 934 int nanobench_main();
935 int nanobench_main() { 935 int nanobench_main() {
936 SetupCrashHandler(); 936 SetupCrashHandler();
937 SkAutoGraphics ag; 937 SkAutoGraphics ag;
938 SkTaskGroup::Enabler enabled; 938 SkTaskGroup::Enabler enabled(FLAGS_threads);
939 939
940 #if SK_SUPPORT_GPU 940 #if SK_SUPPORT_GPU
941 GrContextOptions grContextOpts; 941 GrContextOptions grContextOpts;
942 grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks; 942 grContextOpts.fDrawPathToCompressedTexture = FLAGS_gpuCompressAlphaMasks;
943 gGrFactory.reset(SkNEW_ARGS(GrContextFactory, (grContextOpts))); 943 gGrFactory.reset(SkNEW_ARGS(GrContextFactory, (grContextOpts)));
944 #endif 944 #endif
945 945
946 if (FLAGS_veryVerbose) { 946 if (FLAGS_veryVerbose) {
947 FLAGS_verbose = true; 947 FLAGS_verbose = true;
948 } 948 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 return 0; 1155 return 0;
1156 } 1156 }
1157 1157
1158 #if !defined SK_BUILD_FOR_IOS 1158 #if !defined SK_BUILD_FOR_IOS
1159 int main(int argc, char** argv) { 1159 int main(int argc, char** argv) {
1160 SkCommandLineFlags::Parse(argc, argv); 1160 SkCommandLineFlags::Parse(argc, argv);
1161 return nanobench_main(); 1161 return nanobench_main();
1162 } 1162 }
1163 #endif 1163 #endif
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