OLD | NEW |
---|---|
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 utils#include "SampleCode.h" | 8 utils#include "SampleCode.h" |
9 #include "SkView.h" | 9 #include "SkView.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 r->ref(); | 28 r->ref(); |
29 fReg = TestRegistry::Head(); | 29 fReg = TestRegistry::Head(); |
30 } | 30 } |
31 | 31 |
32 ~Iter() { | 32 ~Iter() { |
33 fReporter->unref(); | 33 fReporter->unref(); |
34 } | 34 } |
35 | 35 |
36 Test* next() { | 36 Test* next() { |
37 if (fReg) { | 37 if (fReg) { |
38 TestRegistry::Factory fact = fReg->factory(); | 38 TestRegistry::Data fact = fReg->data(); |
scroggo
2013/09/04 15:40:21
Again, fact might be better named factory now.
mtklein
2013/09/04 16:36:46
Done.
| |
39 fReg = fReg->next(); | 39 fReg = fReg->next(); |
40 Test* test = fact(NULL); | 40 Test* test = fact(NULL); |
41 test->setReporter(fReporter); | 41 test->setReporter(fReporter); |
42 return test; | 42 return test; |
43 } | 43 } |
44 return NULL; | 44 return NULL; |
45 } | 45 } |
46 | 46 |
47 static int Count() { | 47 static int Count() { |
48 const TestRegistry* reg = TestRegistry::Head(); | 48 const TestRegistry* reg = TestRegistry::Head(); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 } | 108 } |
109 | 109 |
110 private: | 110 private: |
111 typedef SkView INHERITED; | 111 typedef SkView INHERITED; |
112 }; | 112 }; |
113 | 113 |
114 ////////////////////////////////////////////////////////////////////////////// | 114 ////////////////////////////////////////////////////////////////////////////// |
115 | 115 |
116 static SkView* MyFactory() { return new TestsView; } | 116 static SkView* MyFactory() { return new TestsView; } |
117 static SkViewRegister reg(MyFactory); | 117 static SkViewRegister reg(MyFactory); |
OLD | NEW |