Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif | 10 #endif |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 // crash. | 285 // crash. |
| 286 // By skipping the following code on Mac, we don't really lose anything, | 286 // By skipping the following code on Mac, we don't really lose anything, |
| 287 // because the basic GPU information is passed down from browser process | 287 // because the basic GPU information is passed down from browser process |
| 288 // and we already registered them through SetGpuInfo() above. | 288 // and we already registered them through SetGpuInfo() above. |
| 289 base::TimeTicks before_collect_context_graphics_info = | 289 base::TimeTicks before_collect_context_graphics_info = |
| 290 base::TimeTicks::Now(); | 290 base::TimeTicks::Now(); |
| 291 #if !defined(OS_MACOSX) | 291 #if !defined(OS_MACOSX) |
| 292 if (!CollectGraphicsInfo(gpu_info)) | 292 if (!CollectGraphicsInfo(gpu_info)) |
| 293 dead_on_arrival = true; | 293 dead_on_arrival = true; |
| 294 | 294 |
| 295 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 295 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_LINUX) |
| 296 // Recompute gpu driver bug workarounds - this is specifically useful | 296 // Recompute gpu driver bug workarounds - this is specifically useful |
| 297 // on systems where vendor_id/device_id aren't available. | 297 // on systems where vendor_id/device_id aren't available. |
|
Ken Russell (switch to Gerrit)
2015/10/22 17:30:32
Could you please expand this comment? "This is nec
| |
| 298 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { | 298 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { |
| 299 gpu::ApplyGpuDriverBugWorkarounds( | 299 gpu::ApplyGpuDriverBugWorkarounds( |
| 300 gpu_info, const_cast<base::CommandLine*>(&command_line)); | 300 gpu_info, const_cast<base::CommandLine*>(&command_line)); |
| 301 } | 301 } |
| 302 #endif | 302 #endif |
| 303 | 303 |
| 304 #if defined(OS_LINUX) | 304 #if defined(OS_LINUX) |
| 305 initialized_gl_context = true; | 305 initialized_gl_context = true; |
| 306 #if !defined(OS_CHROMEOS) | 306 #if !defined(OS_CHROMEOS) |
| 307 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA | 307 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 559 return true; | 559 return true; |
| 560 } | 560 } |
| 561 | 561 |
| 562 return false; | 562 return false; |
| 563 } | 563 } |
| 564 #endif // defined(OS_WIN) | 564 #endif // defined(OS_WIN) |
| 565 | 565 |
| 566 } // namespace. | 566 } // namespace. |
| 567 | 567 |
| 568 } // namespace content | 568 } // namespace content |
| OLD | NEW |