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

Unified Diff: content/gpu/gpu_main.cc

Issue 57633007: Merge gpu_switching_list into gpu_driver_bug_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: always apply user-specified switching option Created 7 years, 1 month 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
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index c2ffd63470fbfda833198798b293c7f2a5e9272e..0bed8c28a8a942252c2343c88fd65fc795eecb60 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -29,7 +29,9 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "crypto/hmac.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/config/gpu_info_collector.h"
+#include "gpu/config/gpu_util.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
@@ -115,13 +117,14 @@ int GpuMain(const MainFunctionParams& parameters) {
logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
}
- if (command_line.HasSwitch(switches::kSupportsDualGpus) &&
- command_line.HasSwitch(switches::kGpuSwitching)) {
- std::string option = command_line.GetSwitchValueASCII(
- switches::kGpuSwitching);
- if (option == switches::kGpuSwitchingOptionNameForceDiscrete)
+ if (command_line.HasSwitch(switches::kSupportsDualGpus)) {
+ std::string types = command_line.GetSwitchValueASCII(
+ switches::kGpuDriverBugWorkarounds);
+ std::set<int> workarounds;
+ gpu::StringToFeatureSet(types, &workarounds);
+ if (workarounds.count(gpu::FORCE_DISCRETE_GPU) == 1)
ui::GpuSwitchingManager::GetInstance()->ForceUseOfDiscreteGpu();
- else if (option == switches::kGpuSwitchingOptionNameForceIntegrated)
+ else if (workarounds.count(gpu::FORCE_INTEGRATED_GPU) == 1)
ui::GpuSwitchingManager::GetInstance()->ForceUseOfIntegratedGpu();
}

Powered by Google App Engine
This is Rietveld 408576698