OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |