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/config/gpu_switching_option.h"
     13 #include "gpu/gpu_export.h"
     14 
     15 class CommandLine;
     16 
     17 namespace gpu {
     18 
     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.
     28 GPU_EXPORT void MergeFeatureSets(
     29     std::set<int>* dst, const std::set<int>& src);
     30 
     31 // Collect basic GPUInfo, compute the driver bug workarounds for the current
     32 // system, and append the |command_line|.
     33 GPU_EXPORT void ApplyGpuDriverBugWorkarounds(CommandLine* command_line);
     34 
     35 }  // namespace gpu
     36 
     37 #endif  // GPU_CONFIG_GPU_UTIL_H_
     38 
     39