| 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/gpu_export.h" |  13 #include "gpu/gpu_export.h" | 
|  14  |  14  | 
 |  15 namespace base { | 
|  15 class CommandLine; |  16 class CommandLine; | 
 |  17 } | 
|  16  |  18  | 
|  17 namespace gpu { |  19 namespace gpu { | 
|  18  |  20  | 
|  19 struct GPUInfo; |  21 struct GPUInfo; | 
|  20  |  22  | 
|  21 // Merge features in src into dst. |  23 // Merge features in src into dst. | 
|  22 GPU_EXPORT void MergeFeatureSets( |  24 GPU_EXPORT void MergeFeatureSets( | 
|  23     std::set<int>* dst, const std::set<int>& src); |  25     std::set<int>* dst, const std::set<int>& src); | 
|  24  |  26  | 
|  25 // Collect basic GPUInfo, compute the driver bug workarounds for the current |  27 // Collect basic GPUInfo, compute the driver bug workarounds for the current | 
|  26 // system, and append the |command_line|. |  28 // system, and append the |command_line|. | 
|  27 GPU_EXPORT void ApplyGpuDriverBugWorkarounds(CommandLine* command_line); |  29 GPU_EXPORT void ApplyGpuDriverBugWorkarounds(base::CommandLine* command_line); | 
|  28  |  30  | 
|  29 // With provided GPUInfo, compute the driver bug workarounds for the current |  31 // With provided GPUInfo, compute the driver bug workarounds for the current | 
|  30 // system, and append the |command_line|. |  32 // system, and append the |command_line|. | 
|  31 GPU_EXPORT void ApplyGpuDriverBugWorkarounds( |  33 GPU_EXPORT void ApplyGpuDriverBugWorkarounds( | 
|  32     const GPUInfo& gpu_inco, CommandLine* command_line); |  34     const GPUInfo& gpu_inco, base::CommandLine* command_line); | 
|  33  |  35  | 
|  34 // |str| is in the format of "feature1,feature2,...,featureN". |  36 // |str| is in the format of "feature1,feature2,...,featureN". | 
|  35 GPU_EXPORT void StringToFeatureSet( |  37 GPU_EXPORT void StringToFeatureSet( | 
|  36     const std::string& str, std::set<int>* feature_set); |  38     const std::string& str, std::set<int>* feature_set); | 
|  37  |  39  | 
|  38 // Get the set of workarounds from switches provided in |command_line| |  40 // Get the set of workarounds from switches provided in |command_line| | 
|  39 GPU_EXPORT std::set<int> WorkaroundsFromCommandLine( |  41 GPU_EXPORT std::set<int> WorkaroundsFromCommandLine( | 
|  40     CommandLine* command_line); |  42     base::CommandLine* command_line); | 
|  41  |  43  | 
|  42 }  // namespace gpu |  44 }  // namespace gpu | 
|  43  |  45  | 
|  44 #endif  // GPU_CONFIG_GPU_UTIL_H_ |  46 #endif  // GPU_CONFIG_GPU_UTIL_H_ | 
|  45  |  47  | 
| OLD | NEW |