Hal Canary | a9de760 | 2018-01-19 13:08:23 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include <algorithm> |
| 9 | #include <iostream> |
| 10 | #include <string> |
| 11 | #include <vector> |
| 12 | |
| 13 | #include "gm.h" |
| 14 | |
| 15 | int main() { |
| 16 | std::vector<std::string> gms; |
Hal Canary | 972eba3 | 2018-07-30 17:07:07 -0400 | [diff] [blame] | 17 | for (skiagm::GMFactory factory : skiagm::GMRegistry::Range()) { |
| 18 | std::unique_ptr<skiagm::GM> gm(factory(nullptr)); |
Hal Canary | a9de760 | 2018-01-19 13:08:23 -0500 | [diff] [blame] | 19 | gms.push_back(std::string(gm->getName())); |
| 20 | } |
| 21 | std::sort(gms.begin(), gms.end()); |
| 22 | for (const std::string& gm : gms) { |
| 23 | std::cout << gm << '\n'; |
| 24 | } |
| 25 | } |