• David Black's avatar
    Use small previews for in-app tablet mode. · b541ae90
    David Black authored
    When in tablet mode and in an app, the shelf config changes and the
    default size for holding space previews is too large. Now, shelf config
    changes are observed and holding space previews are resized to fit.
    
    Resizing previews surfaced a few issues also fixed in this CL:
    
    1. Layers were not being destroyed after shifting outside the viewport.
    2. More than 3 previews were visible to the user at a time.
    
    Issue 2 resulted in the 4th preview being slightly visible, making it
    look like paint artifacts of the 3rd preview. Not showing the 4th
    preview introduced some jank when shifting it in because it would
    appear out of nowhere before shifting into position. To soften this,
    added an opacity animation when creating the view.
    
    Bug: 1165326
    Change-Id: Iae5d00c98b8cb24025d0275c6af49b1a13d48f36
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628589
    Commit-Queue: David Black <dmblack@google.com>
    Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#843365}
    b541ae90
holding_space_image.cc 10.7 KB