| 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 "content/browser/gpu/gpu_data_manager.h" | 5 #include "content/browser/gpu/gpu_data_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "chrome/common/chrome_switches.h" | |
| 11 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
| 12 #include "content/browser/gpu/gpu_blacklist.h" | 11 #include "content/browser/gpu/gpu_blacklist.h" |
| 13 #include "content/browser/gpu/gpu_process_host.h" | 12 #include "content/browser/gpu/gpu_process_host.h" |
| 14 #include "content/common/content_client.h" | 13 #include "content/common/content_client.h" |
| 14 #include "content/common/content_switches.h" |
| 15 #include "content/common/gpu/gpu_messages.h" | 15 #include "content/common/gpu/gpu_messages.h" |
| 16 #include "content/gpu/gpu_info_collector.h" | 16 #include "content/gpu/gpu_info_collector.h" |
| 17 #include "ui/gfx/gl/gl_implementation.h" | 17 #include "ui/gfx/gl/gl_implementation.h" |
| 18 #include "ui/gfx/gl/gl_switches.h" | 18 #include "ui/gfx/gl/gl_switches.h" |
| 19 | 19 |
| 20 GpuDataManager::GpuDataManager() | 20 GpuDataManager::GpuDataManager() |
| 21 : complete_gpu_info_already_requested_(false) { | 21 : complete_gpu_info_already_requested_(false) { |
| 22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 23 | 23 |
| 24 GPUInfo gpu_info; | 24 GPUInfo gpu_info; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 268 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
| 269 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || | 269 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || |
| 270 browser_command_line.GetSwitchValueASCII( | 270 browser_command_line.GetSwitchValueASCII( |
| 271 switches::kUseGL) == gfx::kGLImplementationOSMesaName) | 271 switches::kUseGL) == gfx::kGLImplementationOSMesaName) |
| 272 return NULL; | 272 return NULL; |
| 273 // No need to return an empty blacklist. | 273 // No need to return an empty blacklist. |
| 274 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) | 274 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) |
| 275 return NULL; | 275 return NULL; |
| 276 return gpu_blacklist_.get(); | 276 return gpu_blacklist_.get(); |
| 277 } | 277 } |
| OLD | NEW |