diff options
author | simonhong <simonhong@chromium.org> | 2014-11-21 08:38:03 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-21 16:38:23 +0000 |
commit | d3d5f7f94c494dc1289d3ed8ffdc0cc17ba894bc (patch) | |
tree | e85c6ff050d9c198cf9987757e4a0b9c8554962a /cc/scheduler/scheduler_state_machine_unittest.cc | |
parent | c70d974fcb0e6c2e7795bd62d049f98933fc6059 (diff) | |
download | chromium_src-d3d5f7f94c494dc1289d3ed8ffdc0cc17ba894bc.zip chromium_src-d3d5f7f94c494dc1289d3ed8ffdc0cc17ba894bc.tar.gz chromium_src-d3d5f7f94c494dc1289d3ed8ffdc0cc17ba894bc.tar.bz2 |
cc: Add SetChildrenNeedBeginFrames() & SendBeginFramesToChildren()
This cl is preparation for unified BeginFrame in cc layer.
This implements handling of forwarding_begin_frames_to_children in cc.
And this forwarding is not yet propagated to content layer.
R=brianderson@chromium.org
BUG=372086
TEST=cc_unittests
Review URL: https://codereview.chromium.org/723713003
Cr-Commit-Position: refs/heads/master@{#305226}
Diffstat (limited to 'cc/scheduler/scheduler_state_machine_unittest.cc')
-rw-r--r-- | cc/scheduler/scheduler_state_machine_unittest.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc index 85160ed..af6d83a 100644 --- a/cc/scheduler/scheduler_state_machine_unittest.cc +++ b/cc/scheduler/scheduler_state_machine_unittest.cc @@ -1823,5 +1823,20 @@ TEST(SchedulerStateMachineTest, TestSetNeedsAnimateAfterAnimate) { SchedulerStateMachine::ACTION_DRAW_AND_SWAP_IF_POSSIBLE); } +TEST(SchedulerStateMachineTest, TestForwardBeginFramesToChildren) { + SchedulerSettings settings; + settings.forward_begin_frames_to_children = true; + StateMachine state(settings); + state.SetCanStart(); + state.UpdateState(state.NextAction()); + state.CreateAndInitializeOutputSurfaceWithActivatedCommit(); + state.SetVisible(true); + state.SetCanDraw(true); + + EXPECT_FALSE(state.BeginFrameNeeded()); + state.SetChildrenNeedBeginFrames(true); + EXPECT_TRUE(state.BeginFrameNeeded()); +} + } // namespace } // namespace cc |