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

Unified Diff: content/gpu/gpu_main.cc

Issue 2312173003: gpu: Unify code to initialize dual-gpu mode. (Closed)
Patch Set: . Created 4 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_data_manager_impl_private.cc ('k') | gpu/config/gpu_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 4e47b7cf25ef56a0ce57f24a248563c971cde3d2..6e1c7326ec3a5858cf1c6b62da7a8d12e8ec14ed 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -30,6 +30,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/config/gpu_driver_bug_list.h"
#include "gpu/config/gpu_info_collector.h"
#include "gpu/config/gpu_switches.h"
#include "gpu/config/gpu_util.h"
@@ -159,14 +160,10 @@ int GpuMain(const MainFunctionParams& parameters) {
logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
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 (workarounds.count(gpu::FORCE_INTEGRATED_GPU) == 1)
- ui::GpuSwitchingManager::GetInstance()->ForceUseOfIntegratedGpu();
+ gpu::GpuDriverBugList::AppendWorkaroundsFromCommandLine(&workarounds,
+ command_line);
+ gpu::InitializeDualGpusIfSupported(workarounds);
}
// Initialization of the OpenGL bindings may fail, in which case we
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | gpu/config/gpu_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698