James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef GPU_CONFIG_GPU_UTIL_H_ |
| 6 | #define GPU_CONFIG_GPU_UTIL_H_ |
| 7 | |
| 8 | #include <set> |
| 9 | #include <string> |
| 10 | |
| 11 | #include "base/command_line.h" |
| 12 | #include "build/build_config.h" |
| 13 | #include "gpu/gpu_export.h" |
| 14 | |
| 15 | namespace base { |
| 16 | class CommandLine; |
| 17 | } |
| 18 | |
| 19 | namespace gpu { |
| 20 | |
| 21 | struct GPUInfo; |
| 22 | |
| 23 | // Merge features in src into dst. |
| 24 | GPU_EXPORT void MergeFeatureSets( |
| 25 | std::set<int>* dst, const std::set<int>& src); |
| 26 | |
| 27 | // Collect basic GPUInfo, compute the driver bug workarounds for the current |
| 28 | // system, and append the |command_line|. |
| 29 | GPU_EXPORT void ApplyGpuDriverBugWorkarounds(base::CommandLine* command_line); |
| 30 | |
| 31 | // With provided GPUInfo, compute the driver bug workarounds for the current |
| 32 | // system, and append the |command_line|. |
| 33 | GPU_EXPORT void ApplyGpuDriverBugWorkarounds( |
| 34 | const GPUInfo& gpu_inco, base::CommandLine* command_line); |
| 35 | |
| 36 | // |str| is in the format of "feature1,feature2,...,featureN". |
| 37 | GPU_EXPORT void StringToFeatureSet( |
| 38 | const std::string& str, std::set<int>* feature_set); |
| 39 | |
| 40 | } // namespace gpu |
| 41 | |
| 42 | #endif // GPU_CONFIG_GPU_UTIL_H_ |
| 43 | |