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 "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "gpu/config/gpu_feature_info.h" | |
13 #include "gpu/gpu_export.h" | 14 #include "gpu/gpu_export.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 class CommandLine; | 17 class CommandLine; |
17 } | 18 } |
18 | 19 |
19 namespace gpu { | 20 namespace gpu { |
20 | 21 |
21 struct GPUInfo; | 22 struct GPUInfo; |
22 | 23 |
23 // With provided GPUInfo, compute the driver bug workarounds and disabled | 24 // With provided GPUInfo, compute the driver bug workarounds and disabled |
24 // extensions for the current system, and append the |command_line|. | 25 // extensions for the current system, and append the |command_line|. |
25 GPU_EXPORT void ApplyGpuDriverBugWorkarounds( | 26 GPU_EXPORT void ApplyGpuDriverBugWorkarounds( |
26 const GPUInfo& gpu_info, | 27 const GPUInfo& gpu_info, |
27 base::CommandLine* command_line); | 28 base::CommandLine* command_line); |
28 | 29 |
29 // |str| is in the format of "feature1,feature2,...,featureN". | 30 // |str| is in the format of "feature1,feature2,...,featureN". |
30 GPU_EXPORT void StringToFeatureSet( | 31 GPU_EXPORT void StringToFeatureSet( |
31 const std::string& str, std::set<int>* feature_set); | 32 const std::string& str, std::set<int>* feature_set); |
32 | 33 |
33 // With provided command line, fill gpu_info->secondary_gpus with parsed | 34 // With provided command line, fill gpu_info->secondary_gpus with parsed |
34 // secondary vendor and device ids. | 35 // secondary vendor and device ids. |
35 GPU_EXPORT void ParseSecondaryGpuDevicesFromCommandLine( | 36 GPU_EXPORT void ParseSecondaryGpuDevicesFromCommandLine( |
36 const base::CommandLine& command_line, | 37 const base::CommandLine& command_line, |
37 GPUInfo* gpu_info); | 38 GPUInfo* gpu_info); |
38 | 39 |
39 GPU_EXPORT void InitializeDualGpusIfSupported( | 40 GPU_EXPORT void InitializeDualGpusIfSupported( |
40 const std::set<int>& driver_bug_workarounds); | 41 const std::set<int>& driver_bug_workarounds); |
41 | 42 |
43 GPU_EXPORT GpuFeatureInfo | |
rjkroege
2017/02/07 00:42:41
can you say if it's safe to call this function aft
ericrk
2017/02/08 21:29:46
Yup - you can call this at any point - added a com
| |
44 GetGpuFeatureInfo(const GPUInfo& gpu_info, | |
45 const base::CommandLine& command_line); | |
46 | |
42 } // namespace gpu | 47 } // namespace gpu |
43 | 48 |
44 #endif // GPU_CONFIG_GPU_UTIL_H_ | 49 #endif // GPU_CONFIG_GPU_UTIL_H_ |
45 | 50 |
OLD | NEW |