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