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

Side by Side Diff: ui/gl/gpu_switching_manager.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 unified diff | Download patch | Annotate | Revision Log
« ui/gl/gl_switches.cc ('K') | « ui/gl/gpu_switching_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/gl/gpu_switching_manager.h"
6
7 #include "base/logging.h"
8
9 namespace gfx {
10
11 // static
12 GpuSwitchingManager* GpuSwitchingManager::GetInstance() {
13 return Singleton<GpuSwitchingManager>::get();
14 }
15
16 GpuSwitchingManager::GpuSwitchingManager() {
17 }
18
19 GpuSwitchingManager::~GpuSwitchingManager() {
20 }
21
22 void GpuSwitchingManager::ForceUseOfIntegratedGpu() {
23 gpu_switching_option_.clear();
24 gpu_switching_option_.push_back(PreferIntegratedGpu);
25 }
26
27 void GpuSwitchingManager::ForceUseOfDiscreteGpu() {
28 gpu_switching_option_.clear();
29 gpu_switching_option_.push_back(PreferDiscreteGpu);
30 }
31
32 GpuPreference GpuSwitchingManager::AdjustGpuPreference(
33 GpuPreference gpu_preference) {
34 if (gpu_switching_option_.size() == 0)
35 return gpu_preference;
36 DCHECK_EQ(gpu_switching_option_.size(), 1u);
37 return gpu_switching_option_[0];
38 }
39
40 } // namespace gfx
41
OLDNEW
« ui/gl/gl_switches.cc ('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