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

Side by Side Diff: bench/nanobench.cpp

Issue 1418723002: Valgrind experiment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 } 706 }
707 } 707 }
708 708
709 // Choose the candidate color types for image decoding 709 // Choose the candidate color types for image decoding
710 const SkColorType colorTypes[] = 710 const SkColorType colorTypes[] =
711 { kN32_SkColorType, 711 { kN32_SkColorType,
712 kRGB_565_SkColorType, 712 kRGB_565_SkColorType,
713 kAlpha_8_SkColorType, 713 kAlpha_8_SkColorType,
714 kIndex_8_SkColorType, 714 kIndex_8_SkColorType,
715 kGray_8_SkColorType }; 715 kGray_8_SkColorType };
716 fColorTypes.push_back_n(SK_ARRAY_COUNT(colorTypes), colorTypes); 716 fColorTypes.reset(colorTypes, SK_ARRAY_COUNT(colorTypes));
717 } 717 }
718 718
719 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic) { 719 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic) {
720 // Not strictly necessary, as it will be checked again later, 720 // Not strictly necessary, as it will be checked again later,
721 // but helps to avoid a lot of pointless work if we're going to skip it. 721 // but helps to avoid a lot of pointless work if we're going to skip it.
722 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) { 722 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) {
723 return false; 723 return false;
724 } 724 }
725 725
726 SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path)); 726 SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 kLastSingle_SubsetType = kBottomRight_SubsetType, 1110 kLastSingle_SubsetType = kBottomRight_SubsetType,
1111 }; 1111 };
1112 1112
1113 const BenchRegistry* fBenches; 1113 const BenchRegistry* fBenches;
1114 const skiagm::GMRegistry* fGMs; 1114 const skiagm::GMRegistry* fGMs;
1115 SkIRect fClip; 1115 SkIRect fClip;
1116 SkTArray<SkScalar> fScales; 1116 SkTArray<SkScalar> fScales;
1117 SkTArray<SkString> fSKPs; 1117 SkTArray<SkString> fSKPs;
1118 SkTArray<bool> fUseMPDs; 1118 SkTArray<bool> fUseMPDs;
1119 SkTArray<SkString> fImages; 1119 SkTArray<SkString> fImages;
1120 SkTArray<SkColorType> fColorTypes; 1120 SkTArray<SkColorType, true> fColorTypes;
1121 SkScalar fZoomMax; 1121 SkScalar fZoomMax;
1122 double fZoomPeriodMs; 1122 double fZoomPeriodMs;
1123 1123
1124 double fSKPBytes, fSKPOps; 1124 double fSKPBytes, fSKPOps;
1125 1125
1126 const char* fSourceType; // What we're benching: bench, GM, SKP, ... 1126 const char* fSourceType; // What we're benching: bench, GM, SKP, ...
1127 const char* fBenchType; // How we bench it: micro, recording, playback, .. . 1127 const char* fBenchType; // How we bench it: micro, recording, playback, .. .
1128 int fCurrentRecording; 1128 int fCurrentRecording;
1129 int fCurrentScale; 1129 int fCurrentScale;
1130 int fCurrentSKP; 1130 int fCurrentSKP;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 1364
1365 return 0; 1365 return 0;
1366 } 1366 }
1367 1367
1368 #if !defined SK_BUILD_FOR_IOS 1368 #if !defined SK_BUILD_FOR_IOS
1369 int main(int argc, char** argv) { 1369 int main(int argc, char** argv) {
1370 SkCommandLineFlags::Parse(argc, argv); 1370 SkCommandLineFlags::Parse(argc, argv);
1371 return nanobench_main(); 1371 return nanobench_main();
1372 } 1372 }
1373 #endif 1373 #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