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

Side by Side Diff: ui/gl/gpu_switching_manager.h

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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_GL_GPU_SWITCHING_MANAGER_H_
6 #define UI_GL_GPU_SWITCHING_MANAGER_H_
7
8 #include <vector>
9
10 #include "base/memory/singleton.h"
11 #include "ui/gl/gl_export.h"
12 #include "ui/gl/gpu_preference.h"
13
14 namespace gfx {
15
16 class GL_EXPORT GpuSwitchingManager {
17 public:
18 // Getter for the singleton. This will return NULL on failure.
19 static GpuSwitchingManager* GetInstance();
20
21 // Set the switching option, but don't take any actions until later
22 // we access GPU.
23 void ForceUseOfIntegratedGpu();
24 void ForceUseOfDiscreteGpu();
25
26 // Adjust GpuPreference based on the current switching option.
27 // If none is set, return the original GpuPreference.
28 GpuPreference AdjustGpuPreference(GpuPreference gpu_preference);
29
30 private:
31 friend struct DefaultSingletonTraits<GpuSwitchingManager>;
32
33 GpuSwitchingManager();
34 virtual ~GpuSwitchingManager();
35
36 std::vector<GpuPreference> gpu_switching_option_;
37
38 DISALLOW_COPY_AND_ASSIGN(GpuSwitchingManager);
39 };
40
41 } // namespace gfx
42
43 #endif // UI_GL_GPU_SWITCHING_MANAGER_H_
44
OLDNEW
« ui/gl/gl_switches.cc ('K') | « 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