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

Side by Side Diff: chrome/browser/ui/webui/gpu_internals_ui.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
« no previous file with comments | « no previous file | content/browser/gpu/gpu_blacklist.h » ('j') | ui/gl/gl_switches.cc » ('J')
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 "chrome/browser/ui/webui/gpu_internals_ui.h" 5 #include "chrome/browser/ui/webui/gpu_internals_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 } 339 }
340 feature_status_list->Append( 340 feature_status_list->Append(
341 NewStatusValue(kGpuFeatureInfo[i].name.c_str(), status.c_str())); 341 NewStatusValue(kGpuFeatureInfo[i].name.c_str(), status.c_str()));
342 } 342 }
343 content::GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo(); 343 content::GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo();
344 if (gpu_info.secondary_gpus.size() > 0 || 344 if (gpu_info.secondary_gpus.size() > 0 ||
345 gpu_info.optimus || gpu_info.amd_switchable) { 345 gpu_info.optimus || gpu_info.amd_switchable) {
346 std::string gpu_switching; 346 std::string gpu_switching;
347 switch (GpuDataManager::GetInstance()->GetGpuSwitchingOption()) { 347 switch (GpuDataManager::GetInstance()->GetGpuSwitchingOption()) {
348 case content::GPU_SWITCHING_AUTOMATIC: 348 case content::GPU_SWITCHING_OPTION_AUTOMATIC:
349 gpu_switching = "gpu_switching_automatic"; 349 gpu_switching = "gpu_switching_automatic";
350 break; 350 break;
351 case content::GPU_SWITCHING_FORCE_DISCRETE: 351 case content::GPU_SWITCHING_OPTION_FORCE_DISCRETE:
352 gpu_switching = "gpu_switching_force_discrete"; 352 gpu_switching = "gpu_switching_force_discrete";
353 break; 353 break;
354 case content::GPU_SWITCHING_FORCE_INTEGRATED: 354 case content::GPU_SWITCHING_OPTION_FORCE_INTEGRATED:
355 gpu_switching = "gpu_switching_force_integrated"; 355 gpu_switching = "gpu_switching_force_integrated";
356 break; 356 break;
357 default: 357 default:
358 break; 358 break;
359 } 359 }
360 feature_status_list->Append( 360 feature_status_list->Append(
361 NewStatusValue("gpu_switching", gpu_switching.c_str())); 361 NewStatusValue("gpu_switching", gpu_switching.c_str()));
362 } 362 }
363 status->Set("featureStatus", feature_status_list); 363 status->Set("featureStatus", feature_status_list);
364 } 364 }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 //////////////////////////////////////////////////////////////////////////////// 642 ////////////////////////////////////////////////////////////////////////////////
643 643
644 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) 644 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui)
645 : WebUIController(web_ui) { 645 : WebUIController(web_ui) {
646 web_ui->AddMessageHandler(new GpuMessageHandler()); 646 web_ui->AddMessageHandler(new GpuMessageHandler());
647 647
648 // Set up the chrome://gpu-internals/ source. 648 // Set up the chrome://gpu-internals/ source.
649 Profile* profile = Profile::FromWebUI(web_ui); 649 Profile* profile = Profile::FromWebUI(web_ui);
650 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); 650 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource());
651 } 651 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_blacklist.h » ('j') | ui/gl/gl_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698