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

Unified Diff: ui/gl/gpu_switching_manager.cc

Issue 10959050: Honor --gpu-switching=force_discrete to always stay on discrete GPU. (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
« ui/gl/gpu_switching_manager.h ('K') | « ui/gl/gpu_switching_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gpu_switching_manager.cc
===================================================================
--- ui/gl/gpu_switching_manager.cc (revision 158081)
+++ ui/gl/gpu_switching_manager.cc (working copy)
@@ -31,10 +31,17 @@
GpuPreference GpuSwitchingManager::AdjustGpuPreference(
GpuPreference gpu_preference) {
+#if defined(OS_MACOSX)
if (gpu_switching_option_.size() == 0)
return gpu_preference;
DCHECK_EQ(gpu_switching_option_.size(), 1u);
- return gpu_switching_option_[0];
+ if (gpu_switching_option_[0] == PreferDiscreteGpu)
+ GLContextCGL::ForceUseOfDiscreteGPU();
+ return PreferIntegratedGpu;
+#else
+ return gpu_preference;
+#endif // OS_MACOSX
}
} // namespace gfx
+
« ui/gl/gpu_switching_manager.h ('K') | « ui/gl/gpu_switching_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698