cc: Adding BeginFrameTracker object and removing Now() from LTHI.
commit0bdb49d47d685409d8f69dd0eb749a4f9e7bca6a
authormithro <mithro@mithis.com>
Wed, 27 May 2015 13:08:01 +0000 (27 06:08 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 27 May 2015 13:08:44 +0000 (27 13:08 +0000)
tree6fc1bc2145b84ee6bf1ace6a9ae3964ad7a7b73a
parent9f8274214490593da392bd9541fdc646f9d0766e
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
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#331563}
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