Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: cc/scheduler/scheduler_unittest.cc

Issue 1111743002: cc: Adding DidFinishImplFrame to LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto master after landing other patch. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void SetSwapWillHappenIfDrawHappens(bool swap_will_happen_if_draw_happens) { 99 void SetSwapWillHappenIfDrawHappens(bool swap_will_happen_if_draw_happens) {
100 swap_will_happen_if_draw_happens_ = swap_will_happen_if_draw_happens; 100 swap_will_happen_if_draw_happens_ = swap_will_happen_if_draw_happens;
101 } 101 }
102 void SetAutomaticSwapAck(bool automatic_swap_ack) { 102 void SetAutomaticSwapAck(bool automatic_swap_ack) {
103 automatic_swap_ack_ = automatic_swap_ack; 103 automatic_swap_ack_ = automatic_swap_ack;
104 } 104 }
105 // SchedulerClient implementation. 105 // SchedulerClient implementation.
106 void WillBeginImplFrame(const BeginFrameArgs& args) override { 106 void WillBeginImplFrame(const BeginFrameArgs& args) override {
107 PushAction("WillBeginImplFrame"); 107 PushAction("WillBeginImplFrame");
108 } 108 }
109 void DidFinishImplFrame() override {}
110
109 void ScheduledActionSendBeginMainFrame() override { 111 void ScheduledActionSendBeginMainFrame() override {
110 PushAction("ScheduledActionSendBeginMainFrame"); 112 PushAction("ScheduledActionSendBeginMainFrame");
111 } 113 }
112 void ScheduledActionAnimate() override { 114 void ScheduledActionAnimate() override {
113 PushAction("ScheduledActionAnimate"); 115 PushAction("ScheduledActionAnimate");
114 } 116 }
115 DrawResult ScheduledActionDrawAndSwapIfPossible() override { 117 DrawResult ScheduledActionDrawAndSwapIfPossible() override {
116 PushAction("ScheduledActionDrawAndSwapIfPossible"); 118 PushAction("ScheduledActionDrawAndSwapIfPossible");
117 num_draws_++; 119 num_draws_++;
118 DrawResult result = 120 DrawResult result =
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 PushAction("DidAnticipatedDrawTimeChange"); 152 PushAction("DidAnticipatedDrawTimeChange");
151 } 153 }
152 base::TimeDelta DrawDurationEstimate() override { return base::TimeDelta(); } 154 base::TimeDelta DrawDurationEstimate() override { return base::TimeDelta(); }
153 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override { 155 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override {
154 return base::TimeDelta(); 156 return base::TimeDelta();
155 } 157 }
156 base::TimeDelta CommitToActivateDurationEstimate() override { 158 base::TimeDelta CommitToActivateDurationEstimate() override {
157 return base::TimeDelta(); 159 return base::TimeDelta();
158 } 160 }
159 161
160 void DidBeginImplFrameDeadline() override {}
161
162 void SendBeginFramesToChildren(const BeginFrameArgs& args) override { 162 void SendBeginFramesToChildren(const BeginFrameArgs& args) override {
163 begin_frame_is_sent_to_children_ = true; 163 begin_frame_is_sent_to_children_ = true;
164 } 164 }
165 165
166 void SendBeginMainFrameNotExpectedSoon() override { 166 void SendBeginMainFrameNotExpectedSoon() override {
167 PushAction("SendBeginMainFrameNotExpectedSoon"); 167 PushAction("SendBeginMainFrameNotExpectedSoon");
168 } 168 }
169 169
170 base::Callback<bool(void)> ImplFrameDeadlinePending(bool state) { 170 base::Callback<bool(void)> ImplFrameDeadlinePending(bool state) {
171 return base::Bind(&FakeSchedulerClient::ImplFrameDeadlinePendingCallback, 171 return base::Bind(&FakeSchedulerClient::ImplFrameDeadlinePendingCallback,
(...skipping 2438 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 2610
2611 // At the next BeginFrame, authoritative interval is used instead of previous 2611 // At the next BeginFrame, authoritative interval is used instead of previous
2612 // interval. 2612 // interval.
2613 EXPECT_NE(initial_interval, scheduler_->begin_impl_frame_args().interval); 2613 EXPECT_NE(initial_interval, scheduler_->begin_impl_frame_args().interval);
2614 EXPECT_EQ(authoritative_interval, 2614 EXPECT_EQ(authoritative_interval,
2615 scheduler_->begin_impl_frame_args().interval); 2615 scheduler_->begin_impl_frame_args().interval);
2616 } 2616 }
2617 2617
2618 } // namespace 2618 } // namespace
2619 } // namespace cc 2619 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698