OLD | NEW |
1 // Main binary for DM. | 1 // Main binary for DM. |
2 // For a high-level overview, please see dm/README. | 2 // For a high-level overview, please see dm/README. |
3 | 3 |
4 #include "GrContext.h" | 4 #include "GrContext.h" |
5 #include "GrContextFactory.h" | 5 #include "GrContextFactory.h" |
6 #include "SkCommandLineFlags.h" | 6 #include "SkCommandLineFlags.h" |
7 #include "SkForceLinking.h" | 7 #include "SkForceLinking.h" |
8 #include "SkGraphics.h" | 8 #include "SkGraphics.h" |
9 #include "gm.h" | 9 #include "gm.h" |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 class NoExpectations : public ExpectationsSource { | 125 class NoExpectations : public ExpectationsSource { |
126 public: | 126 public: |
127 Expectations get(const char* /*testName*/) const SK_OVERRIDE { | 127 Expectations get(const char* /*testName*/) const SK_OVERRIDE { |
128 return Expectations(); | 128 return Expectations(); |
129 } | 129 } |
130 }; | 130 }; |
131 | 131 |
132 | 132 int tool_main(int argc, char** argv); |
133 int main(int argc, char** argv) { | 133 int tool_main(int argc, char** argv) { |
134 SkGraphics::Init(); | 134 SkGraphics::Init(); |
135 | 135 |
136 SkCommandLineFlags::Parse(argc, argv); | 136 SkCommandLineFlags::Parse(argc, argv); |
137 GM::SetResourcePath(FLAGS_resources[0]); | 137 GM::SetResourcePath(FLAGS_resources[0]); |
138 SkTArray<SkString> configs; | 138 SkTArray<SkString> configs; |
139 for (int i = 0; i < FLAGS_config.count(); i++) { | 139 for (int i = 0; i < FLAGS_config.count(); i++) { |
140 split(FLAGS_config[i], ", ", &configs); | 140 split(FLAGS_config[i], ", ", &configs); |
141 } | 141 } |
142 | 142 |
143 SkTDArray<GMRegistry::Factory> gms; | 143 SkTDArray<GMRegistry::Factory> gms; |
(...skipping 13 matching lines...) Expand all Loading... |
157 tasks.wait(); | 157 tasks.wait(); |
158 | 158 |
159 reporter.updateStatusLine(); | 159 reporter.updateStatusLine(); |
160 SkDebugf("\n"); | 160 SkDebugf("\n"); |
161 report_failures(reporter); | 161 report_failures(reporter); |
162 | 162 |
163 SkGraphics::Term(); | 163 SkGraphics::Term(); |
164 | 164 |
165 return reporter.failed() > 0; | 165 return reporter.failed() > 0; |
166 } | 166 } |
| 167 |
| 168 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 169 int main(int argc, char** argv) { |
| 170 return tool_main(argc, argv); |
| 171 } |
| 172 #endif |
OLD | NEW |