Chromium Code Reviews| Index: content/browser/gpu/gpu_data_manager_impl_private.cc |
| diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc |
| index 319a130a4c0c68108af5018bf44776b414c81fdb..586b90d56c23ccf4906a4420e24038ba03adcf3a 100644 |
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc |
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc |
| @@ -418,13 +418,21 @@ void GpuDataManagerImplPrivate::RequestCompleteGpuInfoIfNeeded() { |
| complete_gpu_info_already_requested_ = true; |
| - GpuProcessHost::SendOnIO( |
| + GpuProcessHost::CallOnIO( |
| #if defined(OS_WIN) |
| GpuProcessHost::GPU_PROCESS_KIND_UNSANDBOXED, |
| #else |
| GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, |
| #endif |
| - true /* force_create */, new GpuMsg_CollectGraphicsInfo()); |
| + true /* force_create */, base::Bind([](GpuProcessHost* host) { |
| + if (!host) |
| + return; |
| + host->gpu_service()->RequestCompleteGpuInfo( |
| + base::Bind([](const gpu::GPUInfo& gpu_info) { |
| + TRACE_EVENT0("test_gpu", "OnGraphicsInfoCollected"); |
| + GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info); |
|
piman
2017/03/20 21:02:36
Should we hop back to the UI thread, though?
I kno
sadrul
2017/03/20 21:21:44
Ah, that's a good point! I have moved this to hop
piman
2017/03/20 21:33:54
I think it would be useful. GpuDataManagerImplPriv
|
| + })); |
| + })); |
| } |
| bool GpuDataManagerImplPrivate::IsEssentialGpuInfoAvailable() const { |