| 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 nanobench_DEFINED | 8 #ifndef nanobench_DEFINED |
| 9 #define nanobench_DEFINED | 9 #define nanobench_DEFINED |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class SkCanvas; | 22 class SkCanvas; |
| 23 | 23 |
| 24 struct Config { | 24 struct Config { |
| 25 const char* name; | 25 const char* name; |
| 26 Benchmark::Backend backend; | 26 Benchmark::Backend backend; |
| 27 SkColorType color; | 27 SkColorType color; |
| 28 SkAlphaType alpha; | 28 SkAlphaType alpha; |
| 29 int samples; | 29 int samples; |
| 30 #if SK_SUPPORT_GPU | 30 #if SK_SUPPORT_GPU |
| 31 GrContextFactory::GLContextType ctxType; | 31 GrContextFactory::GLContextType ctxType; |
| 32 GrContextFactory::GLContextOptions ctxOptions; |
| 32 bool useDFText; | 33 bool useDFText; |
| 33 #else | 34 #else |
| 34 int bogusInt; | 35 int bogusInt; |
| 36 int bogusIntOption; |
| 35 bool bogusBool; | 37 bool bogusBool; |
| 36 #endif | 38 #endif |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 struct Target { | 41 struct Target { |
| 40 explicit Target(const Config& c) : config(c) { } | 42 explicit Target(const Config& c) : config(c) { } |
| 41 virtual ~Target() { } | 43 virtual ~Target() { } |
| 42 | 44 |
| 43 const Config config; | 45 const Config config; |
| 44 SkAutoTDelete<SkSurface> surface; | 46 SkAutoTDelete<SkSurface> surface; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 80 |
| 79 SkCanvas* getCanvas() const { | 81 SkCanvas* getCanvas() const { |
| 80 if (!surface.get()) { | 82 if (!surface.get()) { |
| 81 return nullptr; | 83 return nullptr; |
| 82 } | 84 } |
| 83 return surface->getCanvas(); | 85 return surface->getCanvas(); |
| 84 } | 86 } |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 #endif // nanobench_DEFINED | 89 #endif // nanobench_DEFINED |
| OLD | NEW |