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" | |
13 #include "gpu/gpu_export.h" | 12 #include "gpu/gpu_export.h" |
14 | 13 |
15 class CommandLine; | 14 class CommandLine; |
16 | 15 |
17 namespace gpu { | 16 namespace gpu { |
18 | 17 |
19 // Maps string to GpuSwitchingOption; returns GPU_SWITCHING_UNKNOWN if an | |
20 // unknown name is input (case-sensitive). | |
21 GPU_EXPORT GpuSwitchingOption StringToGpuSwitchingOption( | |
22 const std::string& switching_string); | |
23 | |
24 // Gets a string version of a GpuSwitchingOption. | |
25 GPU_EXPORT std::string GpuSwitchingOptionToString(GpuSwitchingOption option); | |
26 | |
27 // Merge features in src into dst. | 18 // Merge features in src into dst. |
28 GPU_EXPORT void MergeFeatureSets( | 19 GPU_EXPORT void MergeFeatureSets( |
29 std::set<int>* dst, const std::set<int>& src); | 20 std::set<int>* dst, const std::set<int>& src); |
30 | 21 |
31 // Collect basic GPUInfo, compute the driver bug workarounds for the current | 22 // Collect basic GPUInfo, compute the driver bug workarounds for the current |
32 // system, and append the |command_line|. | 23 // system, and append the |command_line|. |
33 GPU_EXPORT void ApplyGpuDriverBugWorkarounds(CommandLine* command_line); | 24 GPU_EXPORT void ApplyGpuDriverBugWorkarounds(CommandLine* command_line); |
34 | 25 |
| 26 // |str| is in the format of "feature1,feature2,...,featureN". |
| 27 GPU_EXPORT void StringToFeatureSet( |
| 28 const std::string& str, std::set<int>* feature_set); |
| 29 |
35 } // namespace gpu | 30 } // namespace gpu |
36 | 31 |
37 #endif // GPU_CONFIG_GPU_UTIL_H_ | 32 #endif // GPU_CONFIG_GPU_UTIL_H_ |
38 | 33 |
OLD | NEW |