summaryrefslogtreecommitdiffstats
path: root/gpu/config/gpu_util.h
blob: 6d6800e39231e67e050c3d117111743771a5ea49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef GPU_CONFIG_GPU_UTIL_H_
#define GPU_CONFIG_GPU_UTIL_H_

#include <set>
#include <string>

#include "build/build_config.h"
#include "gpu/config/gpu_switching_option.h"
#include "gpu/gpu_export.h"

class CommandLine;

namespace gpu {

// Maps string to GpuSwitchingOption; returns GPU_SWITCHING_UNKNOWN if an
// unknown name is input (case-sensitive).
GPU_EXPORT GpuSwitchingOption StringToGpuSwitchingOption(
    const std::string& switching_string);

// Gets a string version of a GpuSwitchingOption.
GPU_EXPORT std::string GpuSwitchingOptionToString(GpuSwitchingOption option);

// Merge features in src into dst.
GPU_EXPORT void MergeFeatureSets(
    std::set<int>* dst, const std::set<int>& src);

// Collect basic GPUInfo, compute the driver bug workarounds for the current
// system, and append the |command_line|.
GPU_EXPORT void ApplyGpuDriverBugWorkarounds(CommandLine* command_line);

}  // namespace gpu

#endif  // GPU_CONFIG_GPU_UTIL_H_