Lazily clear Grid Tab Switcher RecyclerView
In the Tab-to-Grid transition animation, constructing the RecyclerView is very time consuming. The RecyclerView was recycled after the Grid-to-Tab animation, and this CL postpone it later. If the RecyclerView is still there when the Tab-to-Grid animation starts, there will be a lot less work to do, resulting in higher frame rate. The delay can be configured by field trial flag "cleanup-delay", with default of 10 seconds. Setting to 0 would fall back to old behavior. We can also opportunistically skip the Tab-to-Grid transition animation if we have to reconstruct the RecyclerView. This can be configured by field trial flag "skip-slow-zooming", and default to false. If skipped, we fall back to the fading animation. This CL also stops force updating the thumbnail of the current tab when entering GTS. This could lead to stale thumbnail, but runs much faster. Bug: 968822 Change-Id: I0870be13970d6f92ceda31286011d880e7addf74 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636621 Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org> Reviewed-by:Yusuf Ozuysal <yusufo@chromium.org> Cr-Commit-Position: refs/heads/master@{#664984}
Showing
Please register or sign in to comment