New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617824 link

Starred by 11 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 741478



Sign in to add a comment

Mac: Resize has become less smooth as of M46

Project Member Reported by ccameron@chromium.org, Jun 7 2016

Issue description

Mac, M46+

What steps will reproduce the problem?
(1) Resize vigorously (using the lower-left corner, ideally with scrollbars visible)
(2) Notice that it is not particularly smooth

See attached videos.

The issue is that we don't get synchronization of the updates from the remote CALayers in the GPU process.

This can be fixed by moving the CALayer tree to the browser process, or by creating a new remote CALayer at resize (see prototype at https://codereview.chromium.org/2042123002/).

 
smooth.mov
8.6 MB Download
janky.mov
5.6 MB Download
Labels: OS-Mac
Moving the CALayer tree to the browser process is issue 604052, but it is not clear if this is planned.
Cc: nyerramilli@chromium.org ccameron@chromium.org tkonch...@chromium.org
 Issue 617008  has been merged into this issue.
Any progress on this? This bug hurts the user experience.

Comment 4 by sdy@chromium.org, Mar 21 2017

Cc: erikc...@chromium.org sdy@chromium.org
ccameron@, check out crrev/2760413003. Just a PoC, things aren't necessarily in the right place (and it uses SPI).
chrome_process_sync.mp4
1.5 MB View Download

Comment 5 by sdy@chromium.org, Mar 21 2017

Also, a slightly more fun version of the project I uploaded a few days ago, it has this property and keeps drawing when the main process is blocked.
RemoteRendered.zip
8.7 KB Download
kill_stop.mp4
1.2 MB View Download

Comment 6 by sdy@chromium.org, Mar 22 2017

I made a release build with this change and, after playing with it, cannot stress enough how much I now want to find a way to land this CL or a solution like it.
resize_flicker.mp4
4.9 MB View Download
This is awesome and a half, thanks for digging in to this.

Comment 8 by sdy@chromium.org, Mar 23 2017

Sure thing. I'm deferring to you and erikchen@ on next steps (e.g. what we still need to investigate, whether there's a better home for this fix, if there's a known way to get called back during the transaction without using private APIs).

Comment 9 by sdy@chromium.org, Mar 25 2017

Quick note — I think I discovered why this works. While in that post commit handler, the entire area of the screen taken up by the window is frozen. Attached is a screen recording where I added a super long delay on the renderer side at that point to demo.

That doesn't disqualify this solution, just suggests that most of the work should probably happen before the commit, like it does now, and only the final "go ahead and swap/paint/whatever" should be inside.
screen_area_frozen.mp4
1.6 MB View Download
Cc: dgozman@chromium.org
 Issue 394751  has been merged into this issue.
Cc: enne@chromium.org jbau...@chromium.org briander...@chromium.org
 Issue 705278  has been merged into this issue.
Labels: Hotlist-PlatformExcellence
Owner: ----
Status: Available (was: Assigned)
Marking as available PE bug
Cc: ranjitkan@chromium.org tapted@chromium.org rbasuvula@chromium.org msrchandra@chromium.org
 Issue 746905  has been merged into this issue.

Comment 14 by sdy@chromium.org, Aug 17 2017

Cc: -sdy@chromium.org
Owner: sdy@chromium.org
Status: Assigned (was: Available)

Comment 15 by sdy@chromium.org, Sep 25 2017

Blocking: 741478

Comment 16 by sdy@chromium.org, Nov 30 2017

ccameron@ et. al: I just wanted to share a quick PoC of a working fix that's minimally invasive:
https://chromium-review.googlesource.com/c/chromium/src/+/798774

Think there's a more elegant way to thread it through (and only do it during a resize, probably)?
Project Member

Comment 17 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d2f3e5933b3c9dab1b0f0fc3c5f1f3451cdffc4d

commit d2f3e5933b3c9dab1b0f0fc3c5f1f3451cdffc4d
Author: Sidney San Martín <sdy@chromium.org>
Date: Thu Dec 14 02:00:28 2017

[Mac] Make synchronized content resize/repaint visually atomic.

NSDisableScreenUpdates() is advertised for making visually atomic changes that
affect multiple windows, but it it's also effective when multiple processes
have layers in the same window. macOS uses it to synchronize resizing of
out-of-process views like NSOpenPanel.

Leaving screen updates disabled for too long can create funky visual artifacts
within and behind Chrome windows if left on for too long. This waits to flip it
until a frame has been produced of the new size, and it's only on during the
(very brief) compositor swap.

Bug:  617824 ,  741478 
Change-Id: Id6ddfb8848342d6e4b148207a3f76125774081d6
Reviewed-on: https://chromium-review.googlesource.com/798774
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523982}
[modify] https://crrev.com/d2f3e5933b3c9dab1b0f0fc3c5f1f3451cdffc4d/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/d2f3e5933b3c9dab1b0f0fc3c5f1f3451cdffc4d/content/browser/renderer_host/render_widget_host_view_mac.mm

Labels: Needs-Feedback
Tested the issue using #65.0.3295.0 on Mac 10.12.6 as per the steps mentioned in comment #0.

@ccameron: Could you please find the attached screencast and confirm about the fix?

Thanks!!
617824.webm
7.8 MB View Download

Comment 19 by sdy@chromium.org, Mar 5 2018

Components: UI>Browser
Status: Fixed (was: Assigned)
Marking fixed but not verified.

sandeepkumars@: Is it still that janky for you? That looks super bad.

Comment 20 by sdy@chromium.org, Mar 5 2018

Labels: M-65
For anyone following along: this fix is in M65.
Cc: divya.pa...@techmahindra.com kbr@chromium.org
 Issue 786718  has been merged into this issue.

Sign in to add a comment