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

Unified Diff: content/gpu/gpu_main.cc

Issue 10909221: Implement blacklist's force GPU capability in dual GPU machines. (Closed) Base URL: svn://chrome-svn/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
Index: content/gpu/gpu_main.cc
===================================================================
--- content/gpu/gpu_main.cc (revision 156195)
+++ content/gpu/gpu_main.cc (working copy)
@@ -22,10 +22,12 @@
#include "content/gpu/gpu_process.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/gpu_switching_option.h"
#include "content/public/common/main_function_params.h"
#include "crypto/hmac.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
+#include "ui/gl/gpu_switching_manager.h"
#if defined(OS_WIN)
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
@@ -73,6 +75,15 @@
#endif
}
+ if (command_line.HasSwitch(switches::kGpuSwitching)) {
+ std::string option = command_line.GetSwitchValueASCII(
+ switches::kGpuSwitching);
+ if (option == switches::kGpuSwitchingOptionNameForceDiscrete)
+ gfx::GpuSwitchingManager::GetInstance()->ForceUseOfDiscreteGpu();
+ else if (option == switches::kGpuSwitchingOptionNameForceIntegrated)
+ gfx::GpuSwitchingManager::GetInstance()->ForceUseOfIntegratedGpu();
+ }
+
// Initialization of the OpenGL bindings may fail, in which case we
// will need to tear down this process. However, we can not do so
// safely until the IPC channel is set up, because the detection of

Powered by Google App Engine
This is Rietveld 408576698