Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "gm_expectations.h" | 8 #include "gm_expectations.h" |
| 9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 508 SkString filename; | 508 SkString filename; |
| 509 if (iter.next(&filename)) { | 509 if (iter.next(&filename)) { |
| 510 SkString directory(FLAGS_readPath[i]); | 510 SkString directory(FLAGS_readPath[i]); |
| 511 append_path_separator_if_necessary(&directory); | 511 append_path_separator_if_necessary(&directory); |
| 512 do { | 512 do { |
| 513 SkString fullname(directory); | 513 SkString fullname(directory); |
| 514 fullname.append(filename); | 514 fullname.append(filename); |
| 515 decodeFileAndWrite(fullname.c_str(), outDirPtr); | 515 decodeFileAndWrite(fullname.c_str(), outDirPtr); |
| 516 } while (iter.next(&filename)); | 516 } while (iter.next(&filename)); |
| 517 } else { | 517 } else { |
| 518 decodeFileAndWrite(FLAGS_readPath[i], outDirPtr); | 518 // FLAGS_readPath[i] is an empty or nonexistent directory, |
|
scroggo
2013/06/19 15:34:09
I am okay with the spirit of this change, but this
epoger
2013/06/19 15:54:15
Yup. It is handy that --readPath can take either
| |
| 519 // so do nothing. | |
| 519 } | 520 } |
| 520 } | 521 } |
| 521 | 522 |
| 522 if (!FLAGS_createExpectationsPath.isEmpty()) { | 523 if (!FLAGS_createExpectationsPath.isEmpty()) { |
| 523 // Use an empty value for everything besides expectations, since the rea der only cares | 524 // Use an empty value for everything besides expectations, since the rea der only cares |
| 524 // about the expectations. | 525 // about the expectations. |
| 525 Json::Value nullValue; | 526 Json::Value nullValue; |
| 526 Json::Value root = skiagm::CreateJsonTree(gExpectationsToWrite, nullValu e, nullValue, | 527 Json::Value root = skiagm::CreateJsonTree(gExpectationsToWrite, nullValu e, nullValue, |
| 527 nullValue, nullValue); | 528 nullValue, nullValue); |
| 528 std::string jsonStdString = root.toStyledString(); | 529 std::string jsonStdString = root.toStyledString(); |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 544 } | 545 } |
| 545 | 546 |
| 546 return failed ? -1 : 0; | 547 return failed ? -1 : 0; |
| 547 } | 548 } |
| 548 | 549 |
| 549 #if !defined SK_BUILD_FOR_IOS | 550 #if !defined SK_BUILD_FOR_IOS |
| 550 int main(int argc, char * const argv[]) { | 551 int main(int argc, char * const argv[]) { |
| 551 return tool_main(argc, (char**) argv); | 552 return tool_main(argc, (char**) argv); |
| 552 } | 553 } |
| 553 #endif | 554 #endif |
| OLD | NEW |