Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5363)

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2753293003: gpu: Replace GpuMsg_CollectGraphicsInfo with mojom API. (Closed)
Patch Set: tot merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698