cc: Adding BeginFrameTracker object and removing Now() from LTHI.
commitce2671bf523d439ed7db7a606e871ca0416ef7a6
authormithro <mithro@mithis.com>
Fri, 8 May 2015 03:13:04 +0000 (7 20:13 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 8 May 2015 03:13:53 +0000 (8 03:13 +0000)
tree0d1dc192145ef54b682aad699123e8ed27bdb2cd
parent0a8bcc4f85e1b3ca300a133e36f5966dee468acc
cc: Adding BeginFrameTracker object and removing Now() from LTHI.

**Sheriffs**: If this patch is making a test flaky / fail,
then the test was already broken and this just makes the
problem visible.

This patch reduces the jitter in LTHI's animation time to
be identical to the vsync jitter rather than being affected
by the system load and OS scheduling delays.

BeginFrameTracker uses DCHECKs and TRACE_EVENT to strictly
track how the BeginFrameArgs are used throughout the LTHI.
Using this information incorrect usage of Now() has been
eliminated. Methods which violate correct usage of
BeginFrameArgs are now clearly marked to prevent
regressions.

BUG=346230

Review URL: https://codereview.chromium.org/787763006

Cr-Commit-Position: refs/heads/master@{#328911}
16 files changed:
cc/BUILD.gn
cc/cc.gyp
cc/scheduler/begin_frame_tracker.cc [new file with mode: 0644]
cc/scheduler/begin_frame_tracker.h [new file with mode: 0644]
cc/scheduler/scheduler.cc
cc/scheduler/scheduler.h
cc/scheduler/scheduler_unittest.cc
cc/test/fake_layer_tree_host_impl.cc
cc/test/fake_layer_tree_host_impl.h
cc/test/scheduler_test_common.h
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_impl.h
cc/trees/layer_tree_host_impl_unittest.cc
cc/trees/layer_tree_host_unittest_context.cc
cc/trees/layer_tree_impl.cc
cc/trees/layer_tree_impl.h