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 | 9 |
10 #include "BenchTimer.h" | 10 #include "BenchTimer.h" |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 continue; | 669 continue; |
670 } | 670 } |
671 runOnce = true; | 671 runOnce = true; |
672 | 672 |
673 int configIndex = configs[x]; | 673 int configIndex = configs[x]; |
674 | 674 |
675 outConfig = gConfigs[configIndex].fConfig; | 675 outConfig = gConfigs[configIndex].fConfig; |
676 configName = gConfigs[configIndex].fName; | 676 configName = gConfigs[configIndex].fName; |
677 backend = gConfigs[configIndex].fBackend; | 677 backend = gConfigs[configIndex].fBackend; |
678 GrContext* context = NULL; | 678 GrContext* context = NULL; |
679 SkGLContextHelper* glContext = NULL; | |
680 BenchTimer* timer = timers[configIndex]; | 679 BenchTimer* timer = timers[configIndex]; |
681 | 680 |
682 #if SK_SUPPORT_GPU | 681 #if SK_SUPPORT_GPU |
| 682 SkGLContextHelper* glContext = NULL; |
683 if (kGPU_Backend == backend) { | 683 if (kGPU_Backend == backend) { |
684 context = gContextFactory.get(gConfigs[configIndex].fContextType
); | 684 context = gContextFactory.get(gConfigs[configIndex].fContextType
); |
685 if (NULL == context) { | 685 if (NULL == context) { |
686 continue; | 686 continue; |
687 } | 687 } |
688 glContext = gContextFactory.getGLContext(gConfigs[configIndex].f
ContextType); | 688 glContext = gContextFactory.getGLContext(gConfigs[configIndex].f
ContextType); |
689 } | 689 } |
690 #endif | 690 #endif |
691 SkDevice* device = make_device(outConfig, dim, backend, context); | 691 SkDevice* device = make_device(outConfig, dim, backend, context); |
692 SkCanvas* canvas = NULL; | 692 SkCanvas* canvas = NULL; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 } | 840 } |
841 | 841 |
842 return 0; | 842 return 0; |
843 } | 843 } |
844 | 844 |
845 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 845 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
846 int main(int argc, char * const argv[]) { | 846 int main(int argc, char * const argv[]) { |
847 return tool_main(argc, (char**) argv); | 847 return tool_main(argc, (char**) argv); |
848 } | 848 } |
849 #endif | 849 #endif |
OLD | NEW |