commit | 3d256ea09ce900c796386c41c0afc59fd4a344b0 | [log] [tgz] |
---|---|---|
author | Edwin Joe <ejoe@google.com> | Tue Apr 23 21:24:38 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Apr 23 21:24:38 2019 |
tree | d6bcbc1220d05b7e2d12988c57e37c4fc54e62a9 | |
parent | 2e9940c49fab7261750827b3ad35185925071aae [diff] |
Added a PausableElapsedTimer. There are some cases where an elapsed timer that can be paused is useful. An example case is recording surface embedding time to UMA metric. Currently, the surface embedding time is recorded by simply taking the different between the TimeTicks of the surface id allocation time and the TimeTicks of when Surface::OnWillBeDrawn is called. However, it is possible that surface id is allocated when the Renderer is not visible, i.e. when the child changes size while hidden. In this case, the surface embedding time will be arbitrarily inflated since Surface::OnWillBeDrawn will not be called until it becomes visible. By using a pausable elapsed timer, the surface embedding time can be paused if the renderer is hidden, and resumed when it becomes visible again. Bug: 949967 Change-Id: Ide8e5b67a06bae7d3ca1352574c477f35e32369c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1576331 Reviewed-by: Jonathan Ross <jonross@chromium.org> Commit-Queue: Edwin Joe <ejoe@google.com> Cr-Commit-Position: refs/heads/master@{#653372}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .