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

Side by Side Diff: dm/DM.cpp

Issue 346453002: Refactor how we handle resources path in Tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix rebase conflict Created 6 years, 6 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/benchmain.cpp ('k') | gm/cmykjpeg.cpp » ('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 "SkBenchmark.h" 4 #include "SkBenchmark.h"
5 #include "SkCommandLineFlags.h" 5 #include "SkCommandLineFlags.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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 SetupCrashHandler(); 219 SetupCrashHandler();
220 SkAutoGraphics ag; 220 SkAutoGraphics ag;
221 SkCommandLineFlags::Parse(argc, argv); 221 SkCommandLineFlags::Parse(argc, argv);
222 222
223 if (FLAGS_dryRun) { 223 if (FLAGS_dryRun) {
224 FLAGS_verbose = true; 224 FLAGS_verbose = true;
225 } 225 }
226 #if SK_ENABLE_INST_COUNT 226 #if SK_ENABLE_INST_COUNT
227 gPrintInstCount = FLAGS_leaks; 227 gPrintInstCount = FLAGS_leaks;
228 #endif 228 #endif
229 GM::SetResourcePath(FLAGS_resources[0]);
230 SkBenchmark::SetResourcePath(FLAGS_resources[0]);
231 Test::SetResourcePath(FLAGS_resources[0]);
232 229
233 SkTArray<SkString> configs; 230 SkTArray<SkString> configs;
234 for (int i = 0; i < FLAGS_config.count(); i++) { 231 for (int i = 0; i < FLAGS_config.count(); i++) {
235 SkStrSplit(FLAGS_config[i], ", ", &configs); 232 SkStrSplit(FLAGS_config[i], ", ", &configs);
236 } 233 }
237 234
238 SkTDArray<GMRegistry::Factory> gms; 235 SkTDArray<GMRegistry::Factory> gms;
239 SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations)); 236 SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations));
240 if (FLAGS_gms) { 237 if (FLAGS_gms) {
241 append_matching_factories<GM>(GMRegistry::Head(), &gms); 238 append_matching_factories<GM>(GMRegistry::Head(), &gms);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 reporter.getFailures(&failures); 273 reporter.getFailures(&failures);
277 report_failures(failures); 274 report_failures(failures);
278 return failures.count() > 0; 275 return failures.count() > 0;
279 } 276 }
280 277
281 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 278 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
282 int main(int argc, char** argv) { 279 int main(int argc, char** argv) {
283 return tool_main(argc, argv); 280 return tool_main(argc, argv);
284 } 281 }
285 #endif 282 #endif
OLDNEW
« no previous file with comments | « bench/benchmain.cpp ('k') | gm/cmykjpeg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698