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

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

Issue 2050943002: Roll base to 9e74307b276b2f9988005c0e97e85ee222586f79. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « 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')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/gpu_switching_manager.h" 5 #include "ui/gl/gpu_switching_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/gl/gl_switches.h" 9 #include "ui/gl/gl_switches.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 // static 13 // static
14 GpuSwitchingManager* GpuSwitchingManager::GetInstance() { 14 GpuSwitchingManager* GpuSwitchingManager::GetInstance() {
15 return Singleton<GpuSwitchingManager>::get(); 15 return base::Singleton<GpuSwitchingManager>::get();
16 } 16 }
17 17
18 GpuSwitchingManager::GpuSwitchingManager() 18 GpuSwitchingManager::GpuSwitchingManager()
19 : gpu_switching_option_(gfx::PreferIntegratedGpu), 19 : gpu_switching_option_(gfx::PreferIntegratedGpu),
20 gpu_switching_option_set_(false), 20 gpu_switching_option_set_(false),
21 supports_dual_gpus_(false), 21 supports_dual_gpus_(false),
22 supports_dual_gpus_set_(false), 22 supports_dual_gpus_set_(false),
23 gpu_count_(0) { 23 gpu_count_(0) {
24 } 24 }
25 25
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 gfx::GpuPreference GpuSwitchingManager::AdjustGpuPreference( 88 gfx::GpuPreference GpuSwitchingManager::AdjustGpuPreference(
89 gfx::GpuPreference gpu_preference) { 89 gfx::GpuPreference gpu_preference) {
90 if (!gpu_switching_option_set_) 90 if (!gpu_switching_option_set_)
91 return gpu_preference; 91 return gpu_preference;
92 return gpu_switching_option_; 92 return gpu_switching_option_;
93 } 93 }
94 94
95 } // namespace ui 95 } // namespace ui
OLDNEW
« 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