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

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
« no previous file with comments | « 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)
@@ -34,7 +34,14 @@
if (gpu_switching_option_.size() == 0)
return gpu_preference;
DCHECK_EQ(gpu_switching_option_.size(), 1u);
+#if defined(OS_MACOSX)
+ // Create a pixel format that lasts the lifespan of Chrome, so Chrome
+ // stays on the discrete GPU.
+ if (gpu_switching_option_[0] == PreferDiscreteGpu)
+ GLContextCGL::ForceUseOfDiscreteGPU();
+#endif // OS_MACOSX
return gpu_switching_option_[0];
}
} // namespace gfx
+
« no previous file with comments | « ui/gl/gpu_switching_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698