OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GPU_CONFIG_GPU_UTIL_H_ | 5 #ifndef GPU_CONFIG_GPU_UTIL_H_ |
6 #define GPU_CONFIG_GPU_UTIL_H_ | 6 #define GPU_CONFIG_GPU_UTIL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "gpu/config/gpu_switching_option.h" | 12 #include "gpu/config/gpu_switching_option.h" |
13 #include "gpu/gpu_export.h" | 13 #include "gpu/gpu_export.h" |
14 | 14 |
| 15 class CommandLine; |
| 16 |
15 namespace gpu { | 17 namespace gpu { |
16 | 18 |
17 // Maps string to GpuSwitchingOption; returns GPU_SWITCHING_UNKNOWN if an | 19 // Maps string to GpuSwitchingOption; returns GPU_SWITCHING_UNKNOWN if an |
18 // unknown name is input (case-sensitive). | 20 // unknown name is input (case-sensitive). |
19 GPU_EXPORT GpuSwitchingOption StringToGpuSwitchingOption( | 21 GPU_EXPORT GpuSwitchingOption StringToGpuSwitchingOption( |
20 const std::string& switching_string); | 22 const std::string& switching_string); |
21 | 23 |
22 // Gets a string version of a GpuSwitchingOption. | 24 // Gets a string version of a GpuSwitchingOption. |
23 GPU_EXPORT std::string GpuSwitchingOptionToString(GpuSwitchingOption option); | 25 GPU_EXPORT std::string GpuSwitchingOptionToString(GpuSwitchingOption option); |
24 | 26 |
25 // Merge features in src into dst. | 27 // Merge features in src into dst. |
26 GPU_EXPORT void MergeFeatureSets( | 28 GPU_EXPORT void MergeFeatureSets( |
27 std::set<int>* dst, const std::set<int>& src); | 29 std::set<int>* dst, const std::set<int>& src); |
28 | 30 |
| 31 // Collect basic GPUInfo, compute the driver bug workarounds for the current |
| 32 // system, and append the |command_line|. |
| 33 GPU_EXPORT void ApplyGpuDriverBugWorkarounds(CommandLine* command_line); |
| 34 |
29 } // namespace gpu | 35 } // namespace gpu |
30 | 36 |
31 #endif // GPU_CONFIG_GPU_UTIL_H_ | 37 #endif // GPU_CONFIG_GPU_UTIL_H_ |
32 | 38 |
OLD | NEW |