OLD | NEW |
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 #ifndef Benchmark_DEFINED | 8 #ifndef Benchmark_DEFINED |
9 #define Benchmark_DEFINED | 9 #define Benchmark_DEFINED |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 const char* getName(); | 51 const char* getName(); |
52 const char* getUniqueName(); | 52 const char* getUniqueName(); |
53 SkIPoint getSize(); | 53 SkIPoint getSize(); |
54 | 54 |
55 enum Backend { | 55 enum Backend { |
56 kNonRendering_Backend, | 56 kNonRendering_Backend, |
57 kRaster_Backend, | 57 kRaster_Backend, |
58 kGPU_Backend, | 58 kGPU_Backend, |
59 kPDF_Backend, | 59 kPDF_Backend, |
| 60 kHWUI_Backend, |
60 }; | 61 }; |
61 | 62 |
62 // Call to determine whether the benchmark is intended for | 63 // Call to determine whether the benchmark is intended for |
63 // the rendering mode. | 64 // the rendering mode. |
64 virtual bool isSuitableFor(Backend backend) { | 65 virtual bool isSuitableFor(Backend backend) { |
65 return backend != kNonRendering_Backend; | 66 return backend != kNonRendering_Backend; |
66 } | 67 } |
67 | 68 |
68 // Call before draw, allows the benchmark to do setup work outside of the | 69 // Call before draw, allows the benchmark to do setup work outside of the |
69 // timer. When a benchmark is repeatedly drawn, this should be called once | 70 // timer. When a benchmark is repeatedly drawn, this should be called once |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 int fForceAlpha; | 119 int fForceAlpha; |
119 SkTriState::State fDither; | 120 SkTriState::State fDither; |
120 uint32_t fOrMask, fClearMask; | 121 uint32_t fOrMask, fClearMask; |
121 | 122 |
122 typedef SkRefCnt INHERITED; | 123 typedef SkRefCnt INHERITED; |
123 }; | 124 }; |
124 | 125 |
125 typedef SkTRegistry<Benchmark*(*)(void*)> BenchRegistry; | 126 typedef SkTRegistry<Benchmark*(*)(void*)> BenchRegistry; |
126 | 127 |
127 #endif | 128 #endif |
OLD | NEW |