mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: restore performance of macOS window resizing (#40584)
* fix: restore performance of macOS window resizing Co-authored-by: Samuel Attard <marshallofsound@electronjs.org> * Update .patches * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org> Co-authored-by: Samuel Attard <sam@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
@@ -143,3 +143,4 @@ crash_gpu_process_and_clear_shader_cache_when_skia_reports.patch
|
||||
cherry-pick-3df423a5b8de.patch
|
||||
scale_rects_properly_in_syncgetfirstrectforrange.patch
|
||||
cherry-pick-9384cddc7705.patch
|
||||
fix_restore_original_resize_performance_on_macos.patch
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <marshallofsound@electronjs.org>
|
||||
Date: Tue, 21 Nov 2023 15:03:21 -0800
|
||||
Subject: fix: restore original resize performance on macOS
|
||||
|
||||
Reverts https://chromium-review.googlesource.com/c/chromium/src/+/3118293 which
|
||||
fixed a android only regression but in the process regressed electron window
|
||||
resize perf wildly on macOS.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 94a726acd9a65fdddd0eed81f064d5f17d536aa3..b9ab65467ea02d5c4a5ece6708ee4a31c1c3963f 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2198,9 +2198,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
|
||||
// The resize message (which may not happen immediately) will carry with it
|
||||
// the screen info as well as the new size (if the screen has changed scale
|
||||
- // factor). Force sending the new visual properties even if there is one in
|
||||
- // flight to ensure proper IPC ordering for features like the Fullscreen API.
|
||||
- SynchronizeVisualPropertiesIgnoringPendingAck();
|
||||
+ // factor).
|
||||
+ SynchronizeVisualProperties();
|
||||
|
||||
// The device scale factor will be same for all the views contained by the
|
||||
// primary main frame, so just set it once.
|
||||
Reference in New Issue
Block a user