Avoid solid color flash during cross-process navigation |
|||||||||
Issue descriptionCurrently if a navigation involves creating a new RenderWidget in a new process we see a flash before the new widget draws something.
,
Apr 5 2018
This proposal is great -- leaving the old content present until navigation is much better than flashing a "better solid color" during navigation.
,
Apr 5 2018
ccameron: Unfortunately when I try the same approach on Mac I still see a flash. Please see this recording. The code is here: https://chromium-review.googlesource.com/c/chromium/src/+/999212 Do you know what the problem is?
,
Apr 6 2018
It may have to do with how we recycle ui::Compositors. I can take a look at it.
,
Apr 6 2018
That would be great, thanks! I really don't want Mac to be left out.
,
Apr 6 2018
Hmm, the flashed frame seems to be a solid color. I'll dig in a bit.
,
Apr 6 2018
Here are some before/after videos. If you have a dark theme, the flashes are very visible and very annoying...
,
Apr 6 2018
For macOS there are a couple of changes that need to be made to the patch 1. Update BrowserCompositorMac::TakeFallbackContentFrom to make |this| steal |other|'s ui::Compositor. Couple issues here - the ui::Compositor recycling needs to be LIFO not FIFO - we need to make sure that |this| doesn't request a ui::Compositor too soon 2. Add "don't blow away my content" mode to AcceleratedWidgetMac::ResetNSView - this currently destroys all content on transitions - needs to be updated to selectively not do that Even with these changes, for some reason, my very first transition off of the NTP still has a flash ... I'll look into that. Attaching a video of the result. Feel free to land your patch with macOS as NOTIMPLEMENTED and I can follow up with the various mac inanities...
,
Apr 6 2018
Awesome :)
,
Apr 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/26a1fcd6828003a59683b609476c03c71704a34e commit 26a1fcd6828003a59683b609476c03c71704a34e Author: Saman Sami <samans@chromium.org> Date: Tue Apr 10 17:12:21 2018 Avoid flash during cross-process navigation During navigation, if the new page is rendered by the same RenderWidget as the previous page, we don't hide the previous page until the new page has something to show. However, when the new page has to be rendered by a new RenderWidget we always show a flash during navigation. Two common cases are: - When user navigates by typing a new URL into the omnibox. - Any cross-site navigation when site isolation is enabled. Avoid the flash in these cases by showing the old page until the new page paints. If the new page fails to paint within 4 seconds, we hide the previous page for security reasons. This CL only applies to Aura platforms and Android because no matter what I do on Mac I still see a flash. Bug: 815187 Change-Id: I15345adcdfd8f8ef2ac2aedfe62958ba5621f6f6 Reviewed-on: https://chromium-review.googlesource.com/995915 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by: ccameron <ccameron@chromium.org> Reviewed-by: Michael Wasserman <msw@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Fady Samuel <fsamuel@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Cr-Commit-Position: refs/heads/master@{#549566} [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/chrome/browser/ui/browser.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/frame_host/render_frame_host_manager.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/delegated_frame_host.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/delegated_frame_host.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/input/timeout_monitor.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/input/timeout_monitor.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_impl.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_impl.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_android.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_android.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_aura.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_aura.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_child_frame.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_child_frame.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_mac.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/browser/renderer_host/render_widget_host_view_mac.mm [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/public/browser/render_widget_host_view.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/renderer/render_widget.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/test/test_render_view_host.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/content/test/test_render_view_host.h [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/ui/android/delegated_frame_host_android.cc [modify] https://crrev.com/26a1fcd6828003a59683b609476c03c71704a34e/ui/android/delegated_frame_host_android.h
,
Apr 11 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6240437d9d5b78fb0e6126862d5c75753aab5d4c commit 6240437d9d5b78fb0e6126862d5c75753aab5d4c Author: Saman Sami <samans@chromium.org> Date: Wed Apr 11 00:18:55 2018 Add DCHECK to RWHVAndroid::DestroyDelegatedContent I removed a DCHECK by mistake in crrev.com/c/995915. Also add a comment. Bug: 815187 Change-Id: I5bffc2b23358a56ebf3a35621c6c9f2970519b58 Reviewed-on: https://chromium-review.googlesource.com/1005785 Reviewed-by: Khushal <khushalsagar@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Saman Sami <samans@chromium.org> Cr-Commit-Position: refs/heads/master@{#549690} [modify] https://crrev.com/6240437d9d5b78fb0e6126862d5c75753aab5d4c/content/browser/renderer_host/render_widget_host_view_android.cc [modify] https://crrev.com/6240437d9d5b78fb0e6126862d5c75753aab5d4c/ui/android/delegated_frame_host_android.cc
,
Apr 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e012b9d687352dc9a126f35c2c98b2a17af3ce1d commit e012b9d687352dc9a126f35c2c98b2a17af3ce1d Author: Saman Sami <samans@chromium.org> Date: Mon Apr 16 20:35:30 2018 content: Don't clear background page if rendering timeout is disabled The behaviour changed in crrev.com/c/995915 and some headless tests are failing as a result. Bug: 815187 Change-Id: Iff689a1a8ef0d0b464cf13701034bcca94ef0cf2 Reviewed-on: https://chromium-review.googlesource.com/1014015 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Saman Sami <samans@chromium.org> Cr-Commit-Position: refs/heads/master@{#551100} [modify] https://crrev.com/e012b9d687352dc9a126f35c2c98b2a17af3ce1d/content/browser/renderer_host/render_widget_host_impl.cc
,
Apr 17 2018
Able to reproduce the issue on build without fix(checked on 66.0.3353.0) hence verifying the fix on latest canary 67.0.3398.0 on mac 10.13.3 , Linux and Windows 10. Now no black flash is seen on navigating between pages when black theme is enabled. Attaching video for reference. As fix is working as intended adding Verified labels. Thanks!
,
Apr 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e012b9d687352dc9a126f35c2c98b2a17af3ce1d commit e012b9d687352dc9a126f35c2c98b2a17af3ce1d Author: Saman Sami <samans@chromium.org> Date: Mon Apr 16 20:35:30 2018 content: Don't clear background page if rendering timeout is disabled The behaviour changed in crrev.com/c/995915 and some headless tests are failing as a result. Bug: 815187 Change-Id: Iff689a1a8ef0d0b464cf13701034bcca94ef0cf2 Reviewed-on: https://chromium-review.googlesource.com/1014015 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Saman Sami <samans@chromium.org> Cr-Commit-Position: refs/heads/master@{#551100} [modify] https://crrev.com/e012b9d687352dc9a126f35c2c98b2a17af3ce1d/content/browser/renderer_host/render_widget_host_impl.cc
,
Apr 20 2018
Marking as fixed. Work on Mac can be tracked here: https://bugs.chromium.org/p/chromium/issues/detail?id=829523
,
Apr 26 2018
Thanks samans@! I notice that r551100 landed in 68.0.3398.0, after the branch. Does it need to be merged to M67?
,
Apr 26 2018
I would like to merge this CL into M67 branch. https://chromium-review.googlesource.com/c/chromium/src/+/1010702 There is no risk associated with this CL whatsoever. Without this CL chrome will segfault if run with --disable-new-content-rendering-timeout.
,
Apr 26 2018
16: I don't believe a merge is necessary for my CL, but the CL in #17 should probably be merged in.
,
Apr 26 2018
This bug requires manual review: M67 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 26 2018
Approving merge for CL : https://chromium-review.googlesource.com/c/chromium/src/+/1010702 to M67 branch 3396 based on comment #17. Please merge ASAP. Thank you.
,
Apr 27 2018
Merged: https://chromium-review.googlesource.com/c/chromium/src/+/1030511 |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by creis@chromium.org
, Apr 5 2018Components: UI>Browser>Navigation Internals>Sandbox>SiteIsolation
Labels: -Pri-3 Target-67 M-67 OS-Chrome OS-Linux OS-Mac OS-Windows Pri-1