• erikchen's avatar
    [Reland 1] Use accurate X11 event timestamp computation."" · 2c72cd90
    erikchen authored
    The original CL didn't allow negative time skew from the time server. While this
    is likely correct, this caused unit tests to fail as they relied on negative time
    skew. This CL allows negative time skew, and also removes another source of
    non-determinism from the tests.
    
    Original change's description:
    > Use accurate X11 event timestamp computation.
    >
    > X events have a timestamp which is only well defined relative to the X11 Server
    > time. The previous computation for timestamp for X11 events was making the
    > assumption that Server time and Chrome time were the same. This assumption is
    > not always true -- this is likely the root cause of "bad" timestamps observed in
    > https://bugs.chromium.org/p/chromium/issues/detail?id=650338#c1
    >
    > This CL changes event timestamp computation to make a roundtrip to the X11
    > Server to get an accurate base::TimeTicks. This logic was lifted out of the
    > responsiveness calculator, which was already doing this computation. The latter
    > will subsequently be changed to use the computation in this CL.
    >
    > Change-Id: I963019cd8bfb8ce14e06b3743a159c9c85f2cb82
    > Bug: 859155
    > Reviewed-on: https://chromium-review.googlesource.com/1249383
    > Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
    > Reviewed-by: Avi Drissman <avi@chromium.org>
    > Commit-Queue: Erik Chen <erikchen@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#594844}
    
    Change-Id: I6595f6aa163a18c9724c50546ac8c84bc5c84a03
    Bug: 859155
    Reviewed-on: https://chromium-review.googlesource.com/1252685Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#595454}
    2c72cd90
events_x_utils.cc 29.6 KB