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

Side by Side Diff: dm/DM.cpp

Issue 425393004: SKPs-as-benches in nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guard the HEADER Created 6 years, 4 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 | « bench/nanobench.cpp ('k') | gyp/bench.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Main binary for DM. 1 // Main binary for DM.
2 // For a high-level overview, please see dm/README. 2 // For a high-level overview, please see dm/README.
3 3
4 #include "CrashHandler.h" 4 #include "CrashHandler.h"
5 #include "SkCommonFlags.h" 5 #include "SkCommonFlags.h"
6 #include "SkForceLinking.h" 6 #include "SkForceLinking.h"
7 #include "SkGraphics.h" 7 #include "SkGraphics.h"
8 #include "SkPicture.h" 8 #include "SkPicture.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 #include "Test.h" 10 #include "Test.h"
(...skipping 28 matching lines...) Expand all
39 39
40 static const char kGpuAPINameGL[] = "gl"; 40 static const char kGpuAPINameGL[] = "gl";
41 static const char kGpuAPINameGLES[] = "gles"; 41 static const char kGpuAPINameGLES[] = "gles";
42 42
43 DEFINE_int32(gpuThreads, 1, "Threads for GPU work."); 43 DEFINE_int32(gpuThreads, 1, "Threads for GPU work.");
44 DEFINE_string2(expectations, r, "", 44 DEFINE_string2(expectations, r, "",
45 "If a directory, compare generated images against images under th is path. " 45 "If a directory, compare generated images against images under th is path. "
46 "If a file, compare generated images against JSON expectations at this path." 46 "If a file, compare generated images against JSON expectations at this path."
47 ); 47 );
48 48
49 DEFINE_string(skps, "", "Directory to read skps from.");
50
51 DEFINE_bool(gms, true, "Run GMs?"); 49 DEFINE_bool(gms, true, "Run GMs?");
52 DEFINE_bool(tests, true, "Run tests?"); 50 DEFINE_bool(tests, true, "Run tests?");
53 DEFINE_bool(reportUsedChars, false, "Output test font construction data to be pa sted into" 51 DEFINE_bool(reportUsedChars, false, "Output test font construction data to be pa sted into"
54 " create_test_font.cpp."); 52 " create_test_font.cpp.");
55 53
56 __SK_FORCE_IMAGE_DECODER_LINKING; 54 __SK_FORCE_IMAGE_DECODER_LINKING;
57 55
58 // "FooBar" -> "foobar". Obviously, ASCII only. 56 // "FooBar" -> "foobar". Obviously, ASCII only.
59 static SkString lowercase(SkString s) { 57 static SkString lowercase(SkString s) {
60 for (size_t i = 0; i < s.size(); i++) { 58 for (size_t i = 0; i < s.size(); i++) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 kick_off_tests(tests, &reporter, &tasks); 238 kick_off_tests(tests, &reporter, &tasks);
241 kick_off_skps(skps, &reporter, &tasks); 239 kick_off_skps(skps, &reporter, &tasks);
242 tasks.wait(); 240 tasks.wait();
243 241
244 SkDebugf("\n"); 242 SkDebugf("\n");
245 #ifdef SK_DEBUG 243 #ifdef SK_DEBUG
246 if (FLAGS_portableFonts && FLAGS_reportUsedChars) { 244 if (FLAGS_portableFonts && FLAGS_reportUsedChars) {
247 sk_tool_utils::report_used_chars(); 245 sk_tool_utils::report_used_chars();
248 } 246 }
249 #endif 247 #endif
250 248
251 SkTArray<SkString> failures; 249 SkTArray<SkString> failures;
252 reporter.getFailures(&failures); 250 reporter.getFailures(&failures);
253 report_failures(failures); 251 report_failures(failures);
254 return failures.count() > 0; 252 return failures.count() > 0;
255 } 253 }
256 254
257 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 255 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
258 int main(int argc, char** argv) { 256 int main(int argc, char** argv) {
259 SkCommandLineFlags::Parse(argc, argv); 257 SkCommandLineFlags::Parse(argc, argv);
260 return dm_main(); 258 return dm_main();
261 } 259 }
262 #endif 260 #endif
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | gyp/bench.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698