| Index: content/browser/gpu/gpu_util.cc
|
| ===================================================================
|
| --- content/browser/gpu/gpu_util.cc (revision 156326)
|
| +++ content/browser/gpu/gpu_util.cc (working copy)
|
| @@ -30,11 +30,6 @@
|
| const char kGpuFeatureNameAll[] = "all";
|
| const char kGpuFeatureNameUnknown[] = "unknown";
|
|
|
| -const char kGpuSwitchingNameAutomatic[] = "automatic";
|
| -const char kGpuSwitchingNameForceIntegrated[] = "force_integrated";
|
| -const char kGpuSwitchingNameForceDiscrete[] = "force_discrete";
|
| -const char kGpuSwitchingNameUnknown[] = "unknown";
|
| -
|
| enum GpuFeatureStatus {
|
| kGpuFeatureEnabled = 0,
|
| kGpuFeatureBlacklisted = 1,
|
| @@ -141,15 +136,28 @@
|
|
|
| GpuSwitchingOption StringToGpuSwitchingOption(
|
| const std::string& switching_string) {
|
| - if (switching_string == kGpuSwitchingNameAutomatic)
|
| - return content::GPU_SWITCHING_AUTOMATIC;
|
| - if (switching_string == kGpuSwitchingNameForceIntegrated)
|
| - return content::GPU_SWITCHING_FORCE_INTEGRATED;
|
| - if (switching_string == kGpuSwitchingNameForceDiscrete)
|
| - return content::GPU_SWITCHING_FORCE_DISCRETE;
|
| - return content::GPU_SWITCHING_UNKNOWN;
|
| + if (switching_string == kGpuSwitchingOptionNameAutomatic)
|
| + return content::GPU_SWITCHING_OPTION_AUTOMATIC;
|
| + if (switching_string == kGpuSwitchingOptionNameForceIntegrated)
|
| + return content::GPU_SWITCHING_OPTION_FORCE_INTEGRATED;
|
| + if (switching_string == kGpuSwitchingOptionNameForceDiscrete)
|
| + return content::GPU_SWITCHING_OPTION_FORCE_DISCRETE;
|
| + return content::GPU_SWITCHING_OPTION_UNKNOWN;
|
| }
|
|
|
| +std::string GpuSwitchingOptionToString(GpuSwitchingOption option) {
|
| + switch (option) {
|
| + case content::GPU_SWITCHING_OPTION_AUTOMATIC:
|
| + return kGpuSwitchingOptionNameAutomatic;
|
| + case content::GPU_SWITCHING_OPTION_FORCE_INTEGRATED:
|
| + return kGpuSwitchingOptionNameForceIntegrated;
|
| + case content::GPU_SWITCHING_OPTION_FORCE_DISCRETE:
|
| + return kGpuSwitchingOptionNameForceDiscrete;
|
| + default:
|
| + return "unknown";
|
| + }
|
| +}
|
| +
|
| void UpdateStats(const GpuBlacklist* blacklist,
|
| uint32 blacklisted_features) {
|
| uint32 max_entry_id = blacklist->max_entry_id();
|
|
|