fix: software compositing infinite loop (#44352)
* fix: software compositing infinite loop Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Sam Maddock <smaddock@slack-corp.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Sam Maddock <smaddock@slack-corp.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
This commit is contained in:
parent
e0d14a6d89
commit
777d447018
2 changed files with 32 additions and 0 deletions
|
@ -130,3 +130,4 @@ chore_remove_reference_to_chrome_browser_themes.patch
|
|||
feat_enable_customizing_symbol_color_in_framecaptionbutton.patch
|
||||
build_expose_webplugininfo_interface_to_electron.patch
|
||||
feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
|
||||
fix_software_compositing_infinite_loop.patch
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Maddock <smaddock@slack-corp.com>
|
||||
Date: Fri, 18 Oct 2024 11:11:11 -0400
|
||||
Subject: fix: software compositing infinite loop
|
||||
|
||||
When GPU compositing is unavailable, LayerTreeView::RequestNewLayerTreeFrameSink
|
||||
may run in an infinite loop due to a race condition. Need to allow time to
|
||||
process CompositingModeFallbackToSoftware IPC to disable GPU compositing.
|
||||
|
||||
https://issues.chromium.org/345275130
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
|
||||
index 9497ab591864295231db47fdc526e59935e6aa31..635fa41649db41800f99da2683cc955b2e1e935f 100644
|
||||
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
|
||||
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
|
||||
@@ -374,9 +374,13 @@ void LayerTreeView::DidFailToInitializeLayerTreeFrameSink() {
|
||||
// unable to be killed after Chrome is closed.
|
||||
// https://issues.chromium.org/336164423
|
||||
if (!Platform::Current()->IsGpuRemoteDisconnected()) {
|
||||
- layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostTask(
|
||||
+ // CompositingModeFallbackToSoftware IPC will disable GPU compositing in
|
||||
+ // RenderThread. Post task with delay to give time to receive this IPC and
|
||||
+ // prevent infinite loop of retries for software renderers.
|
||||
+ // https://issues.chromium.org/345275130
|
||||
+ layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostDelayedTask(
|
||||
FROM_HERE, base::BindOnce(&LayerTreeView::RequestNewLayerTreeFrameSink,
|
||||
- weak_factory_.GetWeakPtr()));
|
||||
+ weak_factory_.GetWeakPtr()), base::Milliseconds(10));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue