Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: content/browser/gpu/gpu_util.cc

Issue 10959061: Revert 158076 - Implement blacklist's force GPU capability in dual GPU machines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_util.h ('k') | content/browser/gpu/gpu_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_util.cc
===================================================================
--- content/browser/gpu/gpu_util.cc (revision 158210)
+++ content/browser/gpu/gpu_util.cc (working copy)
@@ -13,7 +13,6 @@
#include "base/version.h"
#include "content/browser/gpu/gpu_blacklist.h"
#include "content/public/common/content_switches.h"
-#include "ui/gl/gl_switches.h"
using content::GpuFeatureType;
using content::GpuSwitchingOption;
@@ -31,6 +30,11 @@
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,
@@ -137,28 +141,15 @@
GpuSwitchingOption StringToGpuSwitchingOption(
const std::string& switching_string) {
- if (switching_string == switches::kGpuSwitchingOptionNameAutomatic)
- return content::GPU_SWITCHING_OPTION_AUTOMATIC;
- if (switching_string == switches::kGpuSwitchingOptionNameForceIntegrated)
- return content::GPU_SWITCHING_OPTION_FORCE_INTEGRATED;
- if (switching_string == switches::kGpuSwitchingOptionNameForceDiscrete)
- return content::GPU_SWITCHING_OPTION_FORCE_DISCRETE;
- return content::GPU_SWITCHING_OPTION_UNKNOWN;
+ 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;
}
-std::string GpuSwitchingOptionToString(GpuSwitchingOption option) {
- switch (option) {
- case content::GPU_SWITCHING_OPTION_AUTOMATIC:
- return switches::kGpuSwitchingOptionNameAutomatic;
- case content::GPU_SWITCHING_OPTION_FORCE_INTEGRATED:
- return switches::kGpuSwitchingOptionNameForceIntegrated;
- case content::GPU_SWITCHING_OPTION_FORCE_DISCRETE:
- return switches::kGpuSwitchingOptionNameForceDiscrete;
- default:
- return "unknown";
- }
-}
-
void UpdateStats(const GpuBlacklist* blacklist,
uint32 blacklisted_features) {
uint32 max_entry_id = blacklist->max_entry_id();
Property changes on: content/browser/gpu/gpu_util.cc
___________________________________________________________________
Deleted: svn:mergeinfo
« no previous file with comments | « content/browser/gpu/gpu_util.h ('k') | content/browser/gpu/gpu_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698