005101424a
Co-authored-by: Charles Kerr <charles@charleskerr.com>
69 lines
3.4 KiB
Diff
69 lines
3.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Deepak Mohan <hop2deep@gmail.com>
|
|
Date: Fri, 28 Feb 2020 15:08:26 -0800
|
|
Subject: gpu: notify when dxdiag request for gpu info fails
|
|
|
|
We rely on the signal OnGpuInfoUpdate to process gpu info.
|
|
When Electron wants to collect the complete info in a single run
|
|
it checks for the presence of dx_diagnostics attribute, as these
|
|
are the only async calls that happens in the gpu process, but
|
|
there are times when this call can fail due to crash or software
|
|
rendering and there is no signal from browser process on this event
|
|
to identify it.
|
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
|
|
index 37cf0780ed47c6d37576a4d6a8eacb33a3efecba..1eaec96a2326c54df9e7d360ad3cfb82294aae41 100644
|
|
--- a/content/browser/gpu/gpu_data_manager_impl.cc
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
|
|
@@ -229,6 +229,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
|
|
base::AutoLock auto_lock(lock_);
|
|
private_->TerminateInfoCollectionGpuProcess();
|
|
}
|
|
+
|
|
+bool GpuDataManagerImpl::DxdiagDx12VulkanRequested() const {
|
|
+ base::AutoLock auto_lock(lock_);
|
|
+ return private_->DxdiagDx12VulkanRequested();
|
|
+}
|
|
#endif
|
|
|
|
void GpuDataManagerImpl::UpdateGpuFeatureInfo(
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
|
|
index e04aace2230b3ff6b44235b2c91038c54f2a2c8a..1f7667c39193b330725f88412680c0c3c2ad8ed5 100644
|
|
--- a/content/browser/gpu/gpu_data_manager_impl.h
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl.h
|
|
@@ -103,6 +103,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
|
// BrowserMainParts override instead.
|
|
void PostCreateThreads();
|
|
void TerminateInfoCollectionGpuProcess();
|
|
+ bool DxdiagDx12VulkanRequested() const;
|
|
#endif
|
|
// Update the GPU feature info. This updates the blocklist and enabled status
|
|
// of GPU rasterization. In the future this will be used for more features.
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
|
index 1e20caac3910a41e9fffeef2411b553644192c3c..21543552efe849a058fe27b65c610fbd4b284ae9 100644
|
|
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
|
@@ -1082,6 +1082,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
|
host->ForceShutdown();
|
|
}
|
|
|
|
+bool GpuDataManagerImplPrivate::DxdiagDx12VulkanRequested() const {
|
|
+ return !(gpu_info_vulkan_request_failed_ ||
|
|
+ gpu_info_dx12_request_failed_ ||
|
|
+ gpu_info_dx_diag_request_failed_);
|
|
+}
|
|
#endif
|
|
|
|
void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
|
index b024f38cef70991a354a6498c5a46400230dec25..8e01059b128732c460d7ddc74db55eb12e437c17 100644
|
|
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
|
@@ -76,6 +76,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
|
bool VulkanRequested() const;
|
|
void PostCreateThreads();
|
|
void TerminateInfoCollectionGpuProcess();
|
|
+ bool DxdiagDx12VulkanRequested() const;
|
|
#endif
|
|
void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info,
|
|
const base::Optional<gpu::GpuFeatureInfo>&
|