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

Unified Diff: ui/gl/gpu_switching_manager.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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') | ui/gl/gpu_timing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gpu_switching_manager.cc
diff --git a/ui/gl/gpu_switching_manager.cc b/ui/gl/gpu_switching_manager.cc
index 758ed91c7c210f7b7e5021a2052b176d7d5b8436..5fdb3cce66963dc373547b88b1cec4883d9b6fb8 100644
--- a/ui/gl/gpu_switching_manager.cc
+++ b/ui/gl/gpu_switching_manager.cc
@@ -28,7 +28,7 @@ GpuSwitchingManager* GpuSwitchingManager::GetInstance() {
}
GpuSwitchingManager::GpuSwitchingManager()
- : gpu_switching_option_(gfx::PreferIntegratedGpu),
+ : gpu_switching_option_(gl::PreferIntegratedGpu),
gpu_switching_option_set_(false),
supports_dual_gpus_(false),
supports_dual_gpus_set_(false),
@@ -48,9 +48,9 @@ GpuSwitchingManager::~GpuSwitchingManager() {
void GpuSwitchingManager::ForceUseOfIntegratedGpu() {
DCHECK(SupportsDualGpus());
if (gpu_switching_option_set_) {
- DCHECK_EQ(gpu_switching_option_, gfx::PreferIntegratedGpu);
+ DCHECK_EQ(gpu_switching_option_, gl::PreferIntegratedGpu);
} else {
- gpu_switching_option_ = gfx::PreferIntegratedGpu;
+ gpu_switching_option_ = gl::PreferIntegratedGpu;
gpu_switching_option_set_ = true;
}
}
@@ -58,9 +58,9 @@ void GpuSwitchingManager::ForceUseOfIntegratedGpu() {
void GpuSwitchingManager::ForceUseOfDiscreteGpu() {
DCHECK(SupportsDualGpus());
if (gpu_switching_option_set_) {
- DCHECK_EQ(gpu_switching_option_, gfx::PreferDiscreteGpu);
+ DCHECK_EQ(gpu_switching_option_, gl::PreferDiscreteGpu);
} else {
- gpu_switching_option_ = gfx::PreferDiscreteGpu;
+ gpu_switching_option_ = gl::PreferDiscreteGpu;
gpu_switching_option_set_ = true;
#if defined(OS_MACOSX)
// Create a pixel format that lasts the lifespan of Chrome, so Chrome
@@ -93,7 +93,7 @@ bool GpuSwitchingManager::SupportsDualGpus() {
flag = (vendor_ids_.size() == 2);
if (flag && command_line.HasSwitch(switches::kUseGL) &&
command_line.GetSwitchValueASCII(switches::kUseGL) !=
- gfx::kGLImplementationDesktopName)
+ gl::kGLImplementationDesktopName)
flag = false;
if (flag) {
@@ -131,8 +131,8 @@ void GpuSwitchingManager::NotifyGpuSwitched() {
FOR_EACH_OBSERVER(GpuSwitchingObserver, observer_list_, OnGpuSwitched());
}
-gfx::GpuPreference GpuSwitchingManager::AdjustGpuPreference(
- gfx::GpuPreference gpu_preference) {
+gl::GpuPreference GpuSwitchingManager::AdjustGpuPreference(
+ gl::GpuPreference gpu_preference) {
if (!gpu_switching_option_set_)
return gpu_preference;
return gpu_switching_option_;
« no previous file with comments | « ui/gl/gpu_switching_manager.h ('k') | ui/gl/gpu_timing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698