OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef VisualFlags_DEFINED | 8 #ifndef VisualFlags_DEFINED |
9 #define VisualFlags_DEFINED | 9 #define VisualFlags_DEFINED |
10 | 10 |
11 #include "SkCommandLineFlags.h" | 11 #include "SkCommandLineFlags.h" |
12 | 12 |
| 13 struct Configs { |
| 14 struct Config { |
| 15 enum Type { |
| 16 kGpu_Type, |
| 17 kMsaa_Type, |
| 18 kNvpr_Type, |
| 19 kCpu_Type, |
| 20 }; |
| 21 Type fType; |
| 22 int fNumSamples; |
| 23 |
| 24 SkString humanReadable() const; |
| 25 }; |
| 26 SkTArray<Config> fList; |
| 27 int fIter; |
| 28 |
| 29 Configs() { fIter = 0; } |
| 30 Config& push_back() { return fList.push_back(); } |
| 31 const Config& current() const { return fList[fIter]; } |
| 32 bool next() { fIter++; return fIter >= fList.count(); } |
| 33 }; |
| 34 |
13 DECLARE_string(config); | 35 DECLARE_string(config); |
14 DECLARE_int32(msaa); | |
15 DECLARE_bool(nvpr); | |
16 | 36 |
17 #endif | 37 #endif |
OLD | NEW |