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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
632 fCurrentSKP++; | 632 fCurrentSKP++; |
633 } | 633 } |
634 fCurrentSKP = 0; | 634 fCurrentSKP = 0; |
635 fCurrentScale++; | 635 fCurrentScale++; |
636 } | 636 } |
637 | 637 |
638 for (; fCurrentCodec < fImages.count(); fCurrentCodec++) { | 638 for (; fCurrentCodec < fImages.count(); fCurrentCodec++) { |
639 const SkString& path = fImages[fCurrentCodec]; | 639 const SkString& path = fImages[fCurrentCodec]; |
640 SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(path.c_str())); | 640 SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(path.c_str())); |
641 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); | 641 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); |
642 SkASSERT(codec); | |
643 if (!codec) { | 642 if (!codec) { |
644 // Nothing to time. | 643 // Nothing to time. |
644 SkDebugf("Cannot find codec for %s\n", path.c_str()); | |
scroggo
2015/04/24 18:27:24
I thought you said it printed this without adding
| |
645 continue; | 645 continue; |
646 } | 646 } |
647 | 647 |
648 while (fCurrentColorType < fColorTypes.count()) { | 648 while (fCurrentColorType < fColorTypes.count()) { |
649 const SkColorType colorType = fColorTypes[fCurrentColorType]; | 649 const SkColorType colorType = fColorTypes[fCurrentColorType]; |
650 fCurrentColorType++; | 650 fCurrentColorType++; |
651 | 651 |
652 // Make sure we can decode to this color type. | 652 // Make sure we can decode to this color type. |
653 SkImageInfo info = codec->getInfo().makeColorType(colorType); | 653 SkImageInfo info = codec->getInfo().makeColorType(colorType); |
654 SkAlphaType alphaType; | 654 SkAlphaType alphaType; |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
992 | 992 |
993 return 0; | 993 return 0; |
994 } | 994 } |
995 | 995 |
996 #if !defined SK_BUILD_FOR_IOS | 996 #if !defined SK_BUILD_FOR_IOS |
997 int main(int argc, char** argv) { | 997 int main(int argc, char** argv) { |
998 SkCommandLineFlags::Parse(argc, argv); | 998 SkCommandLineFlags::Parse(argc, argv); |
999 return nanobench_main(); | 999 return nanobench_main(); |
1000 } | 1000 } |
1001 #endif | 1001 #endif |
OLD | NEW |