| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gpu_data_manager.h" | 5 #include "chrome/browser/gpu_data_manager.h" |
| 6 | 6 |
| 7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "app/gfx/gl/gl_implementation.h" | 8 #include "app/gfx/gl/gl_implementation.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/gpu_process_host_ui_shim.h" | 13 #include "chrome/browser/gpu_process_host_ui_shim.h" |
| 14 #include "chrome/browser/prefs/pref_service.h" | 14 #include "chrome/browser/prefs/pref_service.h" |
| 15 #include "chrome/common/child_process_logging.h" | 15 #include "chrome/common/child_process_logging.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/gpu/gpu_info_collector.h" | |
| 19 #include "content/browser/gpu_blacklist.h" | 18 #include "content/browser/gpu_blacklist.h" |
| 19 #include "content/gpu/gpu_info_collector.h" |
| 20 #include "grit/browser_resources.h" | 20 #include "grit/browser_resources.h" |
| 21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 22 | 22 |
| 23 GpuDataManager::GpuDataManager() | 23 GpuDataManager::GpuDataManager() |
| 24 : complete_gpu_info_already_requested_(false), | 24 : complete_gpu_info_already_requested_(false), |
| 25 gpu_feature_flags_set_(false), | 25 gpu_feature_flags_set_(false), |
| 26 gpu_blacklist_cache_(NULL) { | 26 gpu_blacklist_cache_(NULL) { |
| 27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 28 DCHECK(g_browser_process); | 28 DCHECK(g_browser_process); |
| 29 PrefService* local_state = g_browser_process->local_state(); | 29 PrefService* local_state = g_browser_process->local_state(); |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 browser_command_line.GetSwitchValueASCII( | 277 browser_command_line.GetSwitchValueASCII( |
| 278 switches::kUseGL) == gfx::kGLImplementationOSMesaName) | 278 switches::kUseGL) == gfx::kGLImplementationOSMesaName) |
| 279 return NULL; | 279 return NULL; |
| 280 UpdateGpuBlacklist(); | 280 UpdateGpuBlacklist(); |
| 281 // No need to return an empty blacklist. | 281 // No need to return an empty blacklist. |
| 282 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) | 282 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) |
| 283 return NULL; | 283 return NULL; |
| 284 return gpu_blacklist_.get(); | 284 return gpu_blacklist_.get(); |
| 285 } | 285 } |
| 286 | 286 |
| OLD | NEW |