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

Side by Side Diff: tests/skia_test.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
« src/images/SkImageDecoder_libpng.cpp ('K') | « tests/Test.h ('k') | 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 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 "SkCommandLineFlags.h" 8 #include "SkCommandLineFlags.h"
9 #include "SkGraphics.h" 9 #include "SkGraphics.h"
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
(...skipping 23 matching lines...) Expand all
34 void reset() { 34 void reset() {
35 fReg = TestRegistry::Head(); 35 fReg = TestRegistry::Head();
36 } 36 }
37 37
38 ~Iter() { 38 ~Iter() {
39 fReporter->unref(); 39 fReporter->unref();
40 } 40 }
41 41
42 Test* next() { 42 Test* next() {
43 if (fReg) { 43 if (fReg) {
44 TestRegistry::Factory fact = fReg->factory(); 44 TestRegistry::Data fact = fReg->data();
45 fReg = fReg->next(); 45 fReg = fReg->next();
46 Test* test = fact(NULL); 46 Test* test = fact(NULL);
47 test->setReporter(fReporter); 47 test->setReporter(fReporter);
48 return test; 48 return test;
49 } 49 }
50 return NULL; 50 return NULL;
51 } 51 }
52 52
53 private: 53 private:
54 Reporter* fReporter; 54 Reporter* fReporter;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 GpuTest::DestroyContexts(); 264 GpuTest::DestroyContexts();
265 265
266 return (failCount == 0) ? 0 : 1; 266 return (failCount == 0) ? 0 : 1;
267 } 267 }
268 268
269 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 269 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
270 int main(int argc, char * const argv[]) { 270 int main(int argc, char * const argv[]) {
271 return tool_main(argc, (char**) argv); 271 return tool_main(argc, (char**) argv);
272 } 272 }
273 #endif 273 #endif
OLDNEW
« src/images/SkImageDecoder_libpng.cpp ('K') | « tests/Test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698