OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #if SK_SUPPORT_GPU | 9 #if SK_SUPPORT_GPU |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 class Iter { | 51 class Iter { |
52 public: | 52 public: |
53 Iter() : fBench(BenchRegistry::Head()) {} | 53 Iter() : fBench(BenchRegistry::Head()) {} |
54 | 54 |
55 SkBenchmark* next() { | 55 SkBenchmark* next() { |
56 if (fBench) { | 56 if (fBench) { |
57 BenchRegistry::Factory f = fBench->factory(); | 57 BenchRegistry::Factory f = fBench->factory(); |
58 fBench = fBench->next(); | 58 fBench = fBench->next(); |
59 return f(NULL); | 59 return f(); |
60 } | 60 } |
61 return NULL; | 61 return NULL; |
62 } | 62 } |
63 | 63 |
64 private: | 64 private: |
65 const BenchRegistry* fBench; | 65 const BenchRegistry* fBench; |
66 }; | 66 }; |
67 | 67 |
68 class AutoPrePostDraw { | 68 class AutoPrePostDraw { |
69 public: | 69 public: |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 gContextFactory.destroyContexts(); | 627 gContextFactory.destroyContexts(); |
628 #endif | 628 #endif |
629 return 0; | 629 return 0; |
630 } | 630 } |
631 | 631 |
632 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 632 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
633 int main(int argc, char * const argv[]) { | 633 int main(int argc, char * const argv[]) { |
634 return tool_main(argc, (char**) argv); | 634 return tool_main(argc, (char**) argv); |
635 } | 635 } |
636 #endif | 636 #endif |
OLD | NEW |