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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 12593005: Add a user pref in Settings to disable all GPU features. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 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
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 "content/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 412 }
413 413
414 crashed_before = true; 414 crashed_before = true;
415 last_gpu_crash_time = current_time; 415 last_gpu_crash_time = current_time;
416 416
417 if (gpu_recent_crash_count >= kGpuMaxCrashCount) { 417 if (gpu_recent_crash_count >= kGpuMaxCrashCount) {
418 #if !defined(OS_CHROMEOS) 418 #if !defined(OS_CHROMEOS)
419 // The gpu process is too unstable to use. Disable it for current 419 // The gpu process is too unstable to use. Disable it for current
420 // session. 420 // session.
421 hardware_gpu_enabled_ = false; 421 hardware_gpu_enabled_ = false;
422 GpuDataManagerImpl::GetInstance()->BlacklistCard(); 422 GpuDataManagerImpl::GetInstance()->DisableHardwareAcceleration();
423 #endif 423 #endif
424 } 424 }
425 } 425 }
426 } 426 }
427 427
428 int exit_code; 428 int exit_code;
429 base::TerminationStatus status = process_->GetTerminationStatus(&exit_code); 429 base::TerminationStatus status = process_->GetTerminationStatus(&exit_code);
430 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessTerminationStatus", 430 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessTerminationStatus",
431 status, 431 status,
432 base::TERMINATION_STATUS_MAX_ENUM); 432 base::TERMINATION_STATUS_MAX_ENUM);
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 void GpuProcessHost::BlockLiveOffscreenContexts() { 1090 void GpuProcessHost::BlockLiveOffscreenContexts() {
1091 for (std::multiset<GURL>::iterator iter = 1091 for (std::multiset<GURL>::iterator iter =
1092 urls_with_live_offscreen_contexts_.begin(); 1092 urls_with_live_offscreen_contexts_.begin();
1093 iter != urls_with_live_offscreen_contexts_.end(); ++iter) { 1093 iter != urls_with_live_offscreen_contexts_.end(); ++iter) {
1094 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs( 1094 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(
1095 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN); 1095 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN);
1096 } 1096 }
1097 } 1097 }
1098 1098
1099 } // namespace content 1099 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_unittest.cc ('k') | content/public/browser/gpu_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698