electron/patches/chromium/fix_software_compositing_infinite_loop.patch
trop[bot] 500d453a63
chore: bump chromium to 132.0.6834.0 (34-x-y) (#44666)
* chore: bump chromium in DEPS to 132.0.6827.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 132.0.6828.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 132.0.6830.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 132.0.6832.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 132.0.6834.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update chromium patches

Co-authored-by: VerteDinde <vertedinde@electronjs.org>

* 5977022: Apply os setting of overlay scrollbar to web instances | https://chromium-review.googlesource.com/c/chromium/src/+/5977022

Co-authored-by: VerteDinde <vertedinde@electronjs.org>

* 5991440: Cleanup //ui/compositor from LaCros support code. | https://chromium-review.googlesource.com/c/chromium/src/+/5991440

Co-authored-by: VerteDinde <vertedinde@electronjs.org>

* chore: update all patches

Co-authored-by: VerteDinde <vertedinde@electronjs.org>

* 6000058: Add base_subdirs to file_chooser.mojom NativeFileInfo | https://chromium-review.googlesource.com/c/chromium/src/+/6000058

Co-authored-by: VerteDinde <vertedinde@electronjs.org>

* 6009949: Rename NOTREACHED_NORETURN() uses to NOTREACHED() | https://chromium-review.googlesource.com/c/chromium/src/+/6009949

Co-authored-by: VerteDinde <vertedinde@electronjs.org>

* 5966419: [freezing] Expose frozen state to extensions (3/3 - add frozen to chrome.tabs.Tab).

https://chromium-review.googlesource.com/c/chromium/src/+/5966419
Also https://chromium-review.googlesource.com/c/chromium/src/+/6006424

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-11-14 20:56:18 -05:00

31 lines
1.8 KiB
Diff

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 001e931ba705a1a52dfbcb717fe8e30b7014fde8..c545a7257e561f86aecc336769c0dd22c9772465 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
@@ -381,9 +381,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));
}
}