[Installed PWA] Waits for a frame swap before hiding a splash screen.
This patch fixes the flash of white between the splash screen and the web content in installed web apps. This is achieved with waiting for a compositor frame swap before starting splash screen hiding animation. Adding callbacks for next frame swap in CompositorViewHolder might not be at the right level of abstraction - feedback welcome. I introduced a generic mechanism as we might need it different places as well. E.g. In CustomTabActivity the same issue is solved with a time delay, which I plan to change to this mechanism in a follow up patch. Existing tests for a webapp splash screen cover showing/hiding it in various circumstances. Writing a specific test to assert flash of white is fixed would be more work than it's worth it. FYI: On Google Pixel this causes the splash screen to be shown about 50-100 later, which seems like the time time when flash of white was visible. Bug: 734500 Change-Id: I70f8bde54f251c283e260d17a291685738f9e080 Reviewed-on: https://chromium-review.googlesource.com/569552 Commit-Queue: Piotr Swigon <piotrs@chromium.org> Reviewed-by:Matthew Jones <mdjones@chromium.org> Reviewed-by:
Khushal <khushalsagar@chromium.org> Reviewed-by:
Dominick Ng <dominickn@chromium.org> Cr-Commit-Position: refs/heads/master@{#487336}
Showing
Please register or sign in to comment