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/gfx/gl/gl_implementation.h" | |
8 #include "base/command_line.h" | 7 #include "base/command_line.h" |
9 #include "base/logging.h" | 8 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
11 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/gpu_process_host_ui_shim.h" | 11 #include "chrome/browser/gpu_process_host_ui_shim.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/common/child_process_logging.h" | 13 #include "chrome/common/child_process_logging.h" |
15 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
17 #include "content/browser/gpu_blacklist.h" | 16 #include "content/browser/gpu_blacklist.h" |
18 #include "content/gpu/gpu_info_collector.h" | 17 #include "content/gpu/gpu_info_collector.h" |
19 #include "grit/browser_resources.h" | 18 #include "grit/browser_resources.h" |
20 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
| 20 #include "ui/gfx/gl/gl_implementation.h" |
21 #include "ui/gfx/gl/gl_switches.h" | 21 #include "ui/gfx/gl/gl_switches.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(); |
30 // If we bring up chrome normally, prefs should never be NULL; however, we | 30 // If we bring up chrome normally, prefs should never be NULL; however, we |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 browser_command_line.GetSwitchValueASCII( | 275 browser_command_line.GetSwitchValueASCII( |
276 switches::kUseGL) == gfx::kGLImplementationOSMesaName) | 276 switches::kUseGL) == gfx::kGLImplementationOSMesaName) |
277 return NULL; | 277 return NULL; |
278 UpdateGpuBlacklist(); | 278 UpdateGpuBlacklist(); |
279 // No need to return an empty blacklist. | 279 // No need to return an empty blacklist. |
280 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) | 280 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) |
281 return NULL; | 281 return NULL; |
282 return gpu_blacklist_.get(); | 282 return gpu_blacklist_.get(); |
283 } | 283 } |
284 | 284 |
OLD | NEW |