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

Side by Side Diff: bench/nanobench.cpp

Issue 1058633002: nanobench does not need to handle failed rewind. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 const SkImageGenerator::Result result = codec->getPixels( 654 const SkImageGenerator::Result result = codec->getPixels(
655 bitmap.info(), bitmap.getPixels(), bitmap.rowBytes()); 655 bitmap.info(), bitmap.getPixels(), bitmap.rowBytes());
656 switch (result) { 656 switch (result) {
657 case SkImageGenerator::kSuccess: 657 case SkImageGenerator::kSuccess:
658 case SkImageGenerator::kIncompleteInput: 658 case SkImageGenerator::kIncompleteInput:
659 return new CodecBench(SkOSPath::Basename(path.c_str()), 659 return new CodecBench(SkOSPath::Basename(path.c_str()),
660 encoded, colorType); 660 encoded, colorType);
661 case SkImageGenerator::kInvalidConversion: 661 case SkImageGenerator::kInvalidConversion:
662 // This is okay. Not all conversions are valid. 662 // This is okay. Not all conversions are valid.
663 break; 663 break;
664 case SkImageGenerator::kCouldNotRewind:
665 // FIXME: This is due to a bug in some implementations
666 // of SkCodec. All should support rewinding.
667 break;
668 default: 664 default:
669 // This represents some sort of failure. 665 // This represents some sort of failure.
670 SkASSERT(false); 666 SkASSERT(false);
671 break; 667 break;
672 } 668 }
673 } 669 }
674 fCurrentColorType = 0; 670 fCurrentColorType = 0;
675 } 671 }
676 672
677 // Run the DecodingBenches 673 // Run the DecodingBenches
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 975
980 return 0; 976 return 0;
981 } 977 }
982 978
983 #if !defined SK_BUILD_FOR_IOS 979 #if !defined SK_BUILD_FOR_IOS
984 int main(int argc, char** argv) { 980 int main(int argc, char** argv) {
985 SkCommandLineFlags::Parse(argc, argv); 981 SkCommandLineFlags::Parse(argc, argv);
986 return nanobench_main(); 982 return nanobench_main();
987 } 983 }
988 #endif 984 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698