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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 return; | 457 return; |
458 } | 458 } |
459 if (!lengthLessDigest.equals(digest)) { | 459 if (!lengthLessDigest.equals(digest)) { |
460 gDecodeFailures.push_back().appendf("Without using getLength, %s did not
match digest " | 460 gDecodeFailures.push_back().appendf("Without using getLength, %s did not
match digest " |
461 "that uses getLength\n", srcPath); | 461 "that uses getLength\n", srcPath); |
462 } | 462 } |
463 } | 463 } |
464 #endif // defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX) | 464 #endif // defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX) |
465 | 465 |
466 /** | 466 /** |
467 * Replace all instances of oldChar with newChar in str. | 467 * Replaces all instances of oldChar with newChar in str. |
468 * TODO: Add this function to SkString and write tests for it. | 468 * |
| 469 * TODO: This function appears here and in picture_utils.[cpp|h] ; |
| 470 * we should add the implementation to src/core/SkString.cpp, write tests for it
, |
| 471 * and remove it from elsewhere. |
469 */ | 472 */ |
470 static void replace_char(SkString* str, const char oldChar, const char newChar)
{ | 473 static void replace_char(SkString* str, const char oldChar, const char newChar)
{ |
471 if (NULL == str) { | 474 if (NULL == str) { |
472 return; | 475 return; |
473 } | 476 } |
474 for (size_t i = 0; i < str->size(); ++i) { | 477 for (size_t i = 0; i < str->size(); ++i) { |
475 if (oldChar == str->operator[](i)) { | 478 if (oldChar == str->operator[](i)) { |
476 str->operator[](i) = newChar; | 479 str->operator[](i) = newChar; |
477 } | 480 } |
478 } | 481 } |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 print_strings("Known failures", gKnownFailures); | 834 print_strings("Known failures", gKnownFailures); |
832 | 835 |
833 return failed ? -1 : 0; | 836 return failed ? -1 : 0; |
834 } | 837 } |
835 | 838 |
836 #if !defined SK_BUILD_FOR_IOS | 839 #if !defined SK_BUILD_FOR_IOS |
837 int main(int argc, char * const argv[]) { | 840 int main(int argc, char * const argv[]) { |
838 return tool_main(argc, (char**) argv); | 841 return tool_main(argc, (char**) argv); |
839 } | 842 } |
840 #endif | 843 #endif |
OLD | NEW |