• Sammie Quon's avatar
    Reland "desks: Fix crash when touchpad swipe with external monitors." · fd430464
    Sammie Quon authored
    This is a reland of 9771027b
    
    Original change's description:
    > desks: Fix crash when touchpad swipe with external monitors.
    >
    > The crash was because a new screenshot is requested when the current
    > screenshot is about to get scrolled out of bounds. It was using a fixed
    > number threshold, meaning displays that are not the same size could
    > get out of sync easily, leading to a CHECK failure.
    >
    > This CL addresses that by requesting screenshot on all displays if even
    > one of them needs one. Another approach would be change the spacing and
    > threshold to be based on the display width instead of fixed number, but
    > that could be prone to roundoff error which may cause a similar issue.
    >
    > Also noticed visible desk metric was double counting when there are
    > multiple displays. Added a TODO for that one as it is lower priority.
    >
    > Bug: 1154868
    > Test: manual, added regression test
    > Change-Id: I48f5ef62d3284b710f44a2808f75c95686bc9b3d
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2570551
    > Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    > Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#833993}
    
    Bug: 1154868
    Change-Id: Ib5a1fdd6b5778d350931663862c3204b1bab34fc
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575850Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
    Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#834520}
    fd430464
desk_animation_impl_unittest.cc 3.16 KB