123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
- From: Deepak Mohan <[email protected]>
- 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 0f73a8d0da336036e663927424a3a0ccba9e4f7b..e2fe4908e8e459bb277dfd6becdc486714e814ea 100644
- --- a/content/browser/gpu/gpu_data_manager_impl.cc
- +++ b/content/browser/gpu/gpu_data_manager_impl.cc
- @@ -188,6 +188,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 2e069f00bb0f2c263b60662988548b246b74e5d9..82e9a19b6502aeab8f5d14098f2e5c5f995c3425 100644
- --- a/content/browser/gpu/gpu_data_manager_impl.h
- +++ b/content/browser/gpu/gpu_data_manager_impl.h
- @@ -95,6 +95,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
- // Called from BrowserMainLoop::BrowserThreadsStarted().
- void OnBrowserThreadsStarted();
- void TerminateInfoCollectionGpuProcess();
- + bool DxdiagDx12VulkanRequested() const;
- #endif
- // Update the GPU feature info. This updates the blacklist 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 8ceb4ed3c6bc4759bacdf6a5922dd9a4c5e65322..a0a18214c3a4722c920ad4204a4975625130bb3c 100644
- --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
- +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
- @@ -1059,6 +1059,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 ef74bd7541a2a47e71289b154221a5f5adf1e90b..100d393550d57c24bb0c9dc6d604ed925930bb07 100644
- --- a/content/browser/gpu/gpu_data_manager_impl_private.h
- +++ b/content/browser/gpu/gpu_data_manager_impl_private.h
- @@ -75,6 +75,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
- bool VulkanRequested() const;
- void OnBrowserThreadsStarted();
- void TerminateInfoCollectionGpuProcess();
- + bool DxdiagDx12VulkanRequested() const;
- #endif
- void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info,
- const base::Optional<gpu::GpuFeatureInfo>&
|