electron/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch
electron-roller[bot] 9f673c859d
chore: bump chromium to 124.0.6331.0 (main) (#41474)
* chore: bump chromium in DEPS to 124.0.6329.0

* chore: update patches

* 5319449: Activate popups after async opener fullscreen exit transitions | https://chromium-review.googlesource.com/c/chromium/src/+/5319449

* 5321532: [//ui] Remove ContextFactory::SharedMainThreadContextProvider() | https://chromium-review.googlesource.com/c/chromium/src/+/5321532

* fixup! 5319449: Activate popups after async opener fullscreen exit transitions | https://chromium-review.googlesource.com/c/chromium/src/+/5319449

* 5319141: [OOPIF PDF] Create PdfNavigationThrottle for main frame navigations | https://chromium-review.googlesource.com/c/chromium/src/+/5319141

* test: disable webview.capturePage test for mac arm64

* chore: bump chromium in DEPS to 124.0.6337.0

* chore: update patches

* build: roll back DEPS to 124.0.6331.0

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
2024-03-05 11:47:48 -05:00

70 lines
3.3 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 0582075df870162a97b463f6b3035a30bcfe36ae..d94c18d16f5ad80f14120c249e83e795c50c5106 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -225,6 +225,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
base::AutoLock auto_lock(lock_);
private_->TerminateInfoCollectionGpuProcess();
}
+
+bool GpuDataManagerImpl::DxdiagDx12VulkanRequested() const {
+ base::AutoLock auto_lock(lock_);
+ return private_->DxdiagDx12VulkanRequested();
+}
#endif // BUILDFLAG(IS_WIN)
void GpuDataManagerImpl::PostCreateThreads() {
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 25896ab0f3ca233ae17bf509f2a6ae5a6cc3c54b..5a8e6d184e276833034c604be8c48e01122207e2 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -121,6 +121,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
bool Dx12Requested() const;
bool VulkanRequested() const;
void TerminateInfoCollectionGpuProcess();
+ bool DxdiagDx12VulkanRequested() const;
#endif
// Called from BrowserMainLoop::PostCreateThreads().
// TODO(content/browser/gpu/OWNERS): This should probably use a
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index b9829c8f89a5daf8122ebab3f9c863a5900ac69a..f91e6c4cabf33884498d23a0e0d5e9cde60f2be2 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1232,6 +1232,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
if (host)
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::PostCreateThreads() {
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index 20e883daaa07133f977c5fe0c822f324d2642793..28306624ec6f7f9a7848e65787d4dc5aa738a76c 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -86,6 +86,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
bool Dx12Requested() const;
bool VulkanRequested() const;
void TerminateInfoCollectionGpuProcess();
+ bool DxdiagDx12VulkanRequested() const;
#endif
void PostCreateThreads();
void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);