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

Side by Side Diff: bench/benchmain.cpp

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "BenchTimer.h" 10 #include "BenchTimer.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 class Iter { 79 class Iter {
80 public: 80 public:
81 Iter(void* param) { 81 Iter(void* param) {
82 fBench = BenchRegistry::Head(); 82 fBench = BenchRegistry::Head();
83 fParam = param; 83 fParam = param;
84 } 84 }
85 85
86 SkBenchmark* next() { 86 SkBenchmark* next() {
87 if (fBench) { 87 if (fBench) {
88 BenchRegistry::Factory f = fBench->factory(); 88 BenchRegistry::Data f = fBench->data();
scroggo 2013/09/04 15:40:21 The name f is no longer redundant, and might be be
mtklein 2013/09/04 16:36:46 Renamed everything back to Factory/factory.
89 fBench = fBench->next(); 89 fBench = fBench->next();
90 return f(fParam); 90 return f(fParam);
91 } 91 }
92 return NULL; 92 return NULL;
93 } 93 }
94 94
95 private: 95 private:
96 const BenchRegistry* fBench; 96 const BenchRegistry* fBench;
97 void* fParam; 97 void* fParam;
98 }; 98 };
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 } 970 }
971 971
972 return 0; 972 return 0;
973 } 973 }
974 974
975 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 975 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
976 int main(int argc, char * const argv[]) { 976 int main(int argc, char * const argv[]) {
977 return tool_main(argc, (char**) argv); 977 return tool_main(argc, (char**) argv);
978 } 978 }
979 #endif 979 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698