• Andrew Xu's avatar
    Fix rounding error in coordinate conversion · 545c7c01
    Andrew Xu authored
    Fix the rounding error in code for coordinate conversion from
    native host coordinate to screen DIP coordinate.
    
    In the original code, when mouse cursor is in the warp region of
    secondary display, its screen DIP coordinate which is computed by
    ConvertHostPointToRelativeToRootWindow may be out of secondary display
    due to rounding error. It is also found that this rounding error only
    happens with specific display zoom factors and display rotation
    degrees.
    
    test: ash_unittests
    
    Bug: 905035
    Change-Id: I36af26afe4e210d70b6812a1bddb1a95feb7235f
    Reviewed-on: https://chromium-review.googlesource.com/c/1343249Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
    Commit-Queue: Andrew Xu <andrewxu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#612923}
    545c7c01
ash_window_tree_host_platform.h 3.84 KB