| 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; | |
| 33 bool useDFText; | 32 bool useDFText; |
| 34 #else | 33 #else |
| 35 int bogusInt; | 34 int bogusInt; |
| 36 int bogusIntOption; | |
| 37 bool bogusBool; | 35 bool bogusBool; |
| 38 #endif | 36 #endif |
| 39 }; | 37 }; |
| 40 | 38 |
| 41 struct Target { | 39 struct Target { |
| 42 explicit Target(const Config& c) : config(c) { } | 40 explicit Target(const Config& c) : config(c) { } |
| 43 virtual ~Target() { } | 41 virtual ~Target() { } |
| 44 | 42 |
| 45 const Config config; | 43 const Config config; |
| 46 SkAutoTDelete<SkSurface> surface; | 44 SkAutoTDelete<SkSurface> surface; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 78 |
| 81 SkCanvas* getCanvas() const { | 79 SkCanvas* getCanvas() const { |
| 82 if (!surface.get()) { | 80 if (!surface.get()) { |
| 83 return nullptr; | 81 return nullptr; |
| 84 } | 82 } |
| 85 return surface->getCanvas(); | 83 return surface->getCanvas(); |
| 86 } | 84 } |
| 87 }; | 85 }; |
| 88 | 86 |
| 89 #endif // nanobench_DEFINED | 87 #endif // nanobench_DEFINED |
| OLD | NEW |