• danakj's avatar
    Remove lossy ConvertRectToDIP() methods. · 5747a47e
    danakj authored
    The Convert*ToDIP() and Convert*ToPixel() functions are problematic in
    that they hide what decision is being taken in the underlying code
    when moving from floating point to integer, and consumers should be
    thinking about what they want for correctness. They also act in
    inconsistent ways when converting a Rect vs its components. This
    removes the functions that perform float->int conversions in order to
    have callers show what they intend to happen and make it clear that
    data is being lost in some fashion.
    
    R=ccameron@chromium.org, sky@chromium.org
    
    Bug: 1130050
    Change-Id: Icb49a8a392c50cfe85a646afe30528d9d7207057
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2426366
    Commit-Queue: Scott Violet <sky@chromium.org>
    Auto-Submit: danakj <danakj@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#811332}
    5747a47e
dip_util.h 2.8 KB