Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 518 const bool force_osmesa = | 518 const bool force_osmesa = |
| 519 (command_line->GetSwitchValueASCII(switches::kUseGL) == | 519 (command_line->GetSwitchValueASCII(switches::kUseGL) == |
| 520 gl::kGLImplementationOSMesaName) || | 520 gl::kGLImplementationOSMesaName) || |
| 521 command_line->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests); | 521 command_line->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests); |
| 522 if (force_osmesa) { | 522 if (force_osmesa) { |
| 523 // If using the OSMesa GL implementation, use fake vendor and device ids to | 523 // If using the OSMesa GL implementation, use fake vendor and device ids to |
| 524 // make sure it never gets blacklisted. This is better than simply | 524 // make sure it never gets blacklisted. This is better than simply |
| 525 // cancelling GPUInfo gathering as it allows us to proceed with loading the | 525 // cancelling GPUInfo gathering as it allows us to proceed with loading the |
| 526 // blacklist below which may have non-device specific entries we want to | 526 // blacklist below which may have non-device specific entries we want to |
| 527 // apply anyways (e.g., OS version blacklisting). | 527 // apply anyways (e.g., OS version blacklisting). |
| 528 gpu_info.gpu.vendor_id = 0xffff; | 528 gpu_info.gpu.vendor_id = 0xffff; |
|
danakj
2016/08/13 02:14:57
Do these not work? Do you get why?
sadrul
2016/08/13 02:58:45
Because of this entry in the gpu blacklist: https:
| |
| 529 gpu_info.gpu.device_id = 0xffff; | 529 gpu_info.gpu.device_id = 0xffff; |
| 530 | 530 |
| 531 // Also declare the driver_vendor to be osmesa to be able to specify | 531 // Also declare the driver_vendor to be osmesa to be able to specify |
| 532 // exceptions based on driver_vendor==osmesa for some blacklist rules. | 532 // exceptions based on driver_vendor==osmesa for some blacklist rules. |
| 533 gpu_info.driver_vendor = gl::kGLImplementationOSMesaName; | 533 gpu_info.driver_vendor = gl::kGLImplementationOSMesaName; |
| 534 | 534 |
| 535 // We are not going to call CollectBasicGraphicsInfo. | 535 // We are not going to call CollectBasicGraphicsInfo. |
| 536 // So mark it as collected. | 536 // So mark it as collected. |
| 537 gpu_info.basic_info_state = gpu::kCollectInfoSuccess; | 537 gpu_info.basic_info_state = gpu::kCollectInfoSuccess; |
| 538 } else { | 538 } else { |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 568 if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id) { | 568 if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id) { |
| 569 gpu_info.context_info_state = gpu::kCollectInfoNonFatalFailure; | 569 gpu_info.context_info_state = gpu::kCollectInfoNonFatalFailure; |
| 570 #if defined(OS_WIN) | 570 #if defined(OS_WIN) |
| 571 gpu_info.dx_diagnostics_info_state = gpu::kCollectInfoNonFatalFailure; | 571 gpu_info.dx_diagnostics_info_state = gpu::kCollectInfoNonFatalFailure; |
| 572 #endif // OS_WIN | 572 #endif // OS_WIN |
| 573 } | 573 } |
| 574 #endif // ARCH_CPU_X86_FAMILY | 574 #endif // ARCH_CPU_X86_FAMILY |
| 575 | 575 |
| 576 std::string gpu_blacklist_string; | 576 std::string gpu_blacklist_string; |
| 577 std::string gpu_driver_bug_list_string; | 577 std::string gpu_driver_bug_list_string; |
| 578 if (!command_line->HasSwitch(switches::kIgnoreGpuBlacklist) && | 578 if (!force_osmesa && |
| 579 !command_line->HasSwitch(switches::kIgnoreGpuBlacklist) && | |
| 579 !command_line->HasSwitch(switches::kUseGpuInTests)) { | 580 !command_line->HasSwitch(switches::kUseGpuInTests)) { |
| 580 gpu_blacklist_string = gpu::kSoftwareRenderingListJson; | 581 gpu_blacklist_string = gpu::kSoftwareRenderingListJson; |
| 581 } | 582 } |
| 582 if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { | 583 if (!force_osmesa && |
| 584 !command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { | |
| 583 gpu_driver_bug_list_string = gpu::kGpuDriverBugListJson; | 585 gpu_driver_bug_list_string = gpu::kGpuDriverBugListJson; |
| 584 } | 586 } |
| 585 InitializeImpl(gpu_blacklist_string, | 587 InitializeImpl(gpu_blacklist_string, |
| 586 gpu_driver_bug_list_string, | 588 gpu_driver_bug_list_string, |
| 587 gpu_info); | 589 gpu_info); |
| 588 | 590 |
| 589 if (command_line->HasSwitch(switches::kSingleProcess) || | 591 if (command_line->HasSwitch(switches::kSingleProcess) || |
| 590 command_line->HasSwitch(switches::kInProcessGPU)) { | 592 command_line->HasSwitch(switches::kInProcessGPU)) { |
| 591 command_line->AppendSwitch(switches::kDisableGpuWatchdog); | 593 command_line->AppendSwitch(switches::kDisableGpuWatchdog); |
| 592 AppendGpuCommandLine(command_line, nullptr); | 594 AppendGpuCommandLine(command_line, nullptr); |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1297 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1299 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1298 #if defined(OS_WIN) | 1300 #if defined(OS_WIN) |
| 1299 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1301 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1300 #endif | 1302 #endif |
| 1301 complete_gpu_info_already_requested_ = true; | 1303 complete_gpu_info_already_requested_ = true; |
| 1302 // Some observers might be waiting. | 1304 // Some observers might be waiting. |
| 1303 NotifyGpuInfoUpdate(); | 1305 NotifyGpuInfoUpdate(); |
| 1304 } | 1306 } |
| 1305 | 1307 |
| 1306 } // namespace content | 1308 } // namespace content |
| OLD | NEW |