Chromium Code Reviews| Index: services/ui/gpu/gpu_service.cc |
| diff --git a/services/ui/gpu/gpu_service.cc b/services/ui/gpu/gpu_service.cc |
| index 0330a13c350e1b7dbd0cd64c058bd08bb9ccfcd6..ad5320e0e6c71fbfe01d99c2eab64575459acdb6 100644 |
| --- a/services/ui/gpu/gpu_service.cc |
| +++ b/services/ui/gpu/gpu_service.cc |
| @@ -284,31 +284,33 @@ void GpuService::RequestCompleteGpuInfo( |
| #if defined(OS_MACOSX) |
| void GpuService::UpdateGpuInfoPlatform() { |
| - DCHECK(main_runner_->BelongsToCurrentThread()); |
| - // gpu::CollectContextGraphicsInfo() is already called during gpu process |
| - // initialization (see GpuInit::InitializeAndStartSandbox()) on non-mac |
| - // platforms, and during in-browser gpu thread initialization on all platforms |
| - // (See InProcessGpuThread::Init()). |
| - if (in_host_process_) |
| - return; |
| - |
| - DCHECK_EQ(gpu::kCollectInfoNone, gpu_info_.context_info_state); |
| - gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info_); |
| - switch (result) { |
| - case gpu::kCollectInfoFatalFailure: |
| - LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal)."; |
| - // TODO(piman): can we signal overall failure? |
| - break; |
| - case gpu::kCollectInfoNonFatalFailure: |
| - DVLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal)."; |
| - break; |
| - case gpu::kCollectInfoNone: |
| - NOTREACHED(); |
| - break; |
| - case gpu::kCollectInfoSuccess: |
| - break; |
| + if (gpu_info_.gpu.vendor_id == 0x10de) { // NVIDIA |
|
Zhenyao Mo
2017/06/13 19:01:24
See my comment in the workaround file. Let's not
jiajia.qin
2017/06/14 08:18:21
Acknowledged.
|
| + DCHECK(main_runner_->BelongsToCurrentThread()); |
| + // gpu::CollectContextGraphicsInfo() is already called during gpu process |
| + // initialization (see GpuInit::InitializeAndStartSandbox()) on |
| + // non-nvidia-mac platforms, and during in-browser gpu thread initialization |
| + // on all platforms (See InProcessGpuThread::Init()). |
| + if (in_host_process_) |
| + return; |
| + |
| + DCHECK_EQ(gpu::kCollectInfoNone, gpu_info_.context_info_state); |
| + gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info_); |
| + switch (result) { |
| + case gpu::kCollectInfoFatalFailure: |
| + LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal)."; |
| + // TODO(piman): can we signal overall failure? |
| + break; |
| + case gpu::kCollectInfoNonFatalFailure: |
| + DVLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal)."; |
| + break; |
| + case gpu::kCollectInfoNone: |
| + NOTREACHED(); |
| + break; |
| + case gpu::kCollectInfoSuccess: |
| + break; |
| + } |
| + gpu::SetKeysForCrashLogging(gpu_info_); |
| } |
| - gpu::SetKeysForCrashLogging(gpu_info_); |
| } |
| #elif defined(OS_WIN) |
| void GpuService::UpdateGpuInfoPlatform() { |