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

Unified Diff: ui/gl/gpu_switching_manager.h

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/gl_switches.cc ('k') | ui/gl/gpu_switching_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gpu_switching_manager.h
===================================================================
--- ui/gl/gpu_switching_manager.h (revision 158081)
+++ ui/gl/gpu_switching_manager.h (working copy)
@@ -8,6 +8,9 @@
#include <vector>
#include "base/memory/singleton.h"
+#if defined(OS_MACOSX)
+#include "ui/gl/gl_context_cgl.h"
+#endif // OS_MACOSX
#include "ui/gl/gl_export.h"
#include "ui/gl/gpu_preference.h"
@@ -23,8 +26,10 @@
void ForceUseOfIntegratedGpu();
void ForceUseOfDiscreteGpu();
- // Adjust GpuPreference based on the current switching option.
- // If none is set, return the original GpuPreference.
+ // If no GPU is forced, return the original GpuPreference; otherwise, return
+ // the forced GPU.
+ // If forcing discrete GPU on Mac, we set up a pixel format, which keeps
+ // Chrome on the discrete GPU throughout the rest of Chrome's lifetime.
GpuPreference AdjustGpuPreference(GpuPreference gpu_preference);
private:
« no previous file with comments | « ui/gl/gl_switches.cc ('k') | ui/gl/gpu_switching_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698