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

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: Fixing surfaces_scheduler. 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
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void SetSwapWillHappenIfDrawHappens(bool swap_will_happen_if_draw_happens) { 98 void SetSwapWillHappenIfDrawHappens(bool swap_will_happen_if_draw_happens) {
99 swap_will_happen_if_draw_happens_ = swap_will_happen_if_draw_happens; 99 swap_will_happen_if_draw_happens_ = swap_will_happen_if_draw_happens;
100 } 100 }
101 void SetAutomaticSwapAck(bool automatic_swap_ack) { 101 void SetAutomaticSwapAck(bool automatic_swap_ack) {
102 automatic_swap_ack_ = automatic_swap_ack; 102 automatic_swap_ack_ = automatic_swap_ack;
103 } 103 }
104 // SchedulerClient implementation. 104 // SchedulerClient implementation.
105 void WillBeginImplFrame(const BeginFrameArgs& args) override { 105 void WillBeginImplFrame(const BeginFrameArgs& args) override {
106 PushAction("WillBeginImplFrame"); 106 PushAction("WillBeginImplFrame");
107 } 107 }
108 void DidFinishImplFrame() override {}
109
108 void ScheduledActionSendBeginMainFrame() override { 110 void ScheduledActionSendBeginMainFrame() override {
109 PushAction("ScheduledActionSendBeginMainFrame"); 111 PushAction("ScheduledActionSendBeginMainFrame");
110 } 112 }
111 void ScheduledActionAnimate() override { 113 void ScheduledActionAnimate() override {
112 PushAction("ScheduledActionAnimate"); 114 PushAction("ScheduledActionAnimate");
113 } 115 }
114 DrawResult ScheduledActionDrawAndSwapIfPossible() override { 116 DrawResult ScheduledActionDrawAndSwapIfPossible() override {
115 PushAction("ScheduledActionDrawAndSwapIfPossible"); 117 PushAction("ScheduledActionDrawAndSwapIfPossible");
116 num_draws_++; 118 num_draws_++;
117 DrawResult result = 119 DrawResult result =
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 PushAction("DidAnticipatedDrawTimeChange"); 151 PushAction("DidAnticipatedDrawTimeChange");
150 } 152 }
151 base::TimeDelta DrawDurationEstimate() override { return base::TimeDelta(); } 153 base::TimeDelta DrawDurationEstimate() override { return base::TimeDelta(); }
152 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override { 154 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override {
153 return base::TimeDelta(); 155 return base::TimeDelta();
154 } 156 }
155 base::TimeDelta CommitToActivateDurationEstimate() override { 157 base::TimeDelta CommitToActivateDurationEstimate() override {
156 return base::TimeDelta(); 158 return base::TimeDelta();
157 } 159 }
158 160
159 void DidBeginImplFrameDeadline() override {}
160
161 void SendBeginFramesToChildren(const BeginFrameArgs& args) override { 161 void SendBeginFramesToChildren(const BeginFrameArgs& args) override {
162 begin_frame_args_sent_to_children_ = args; 162 begin_frame_args_sent_to_children_ = args;
163 } 163 }
164 164
165 void SendBeginMainFrameNotExpectedSoon() override { 165 void SendBeginMainFrameNotExpectedSoon() override {
166 PushAction("SendBeginMainFrameNotExpectedSoon"); 166 PushAction("SendBeginMainFrameNotExpectedSoon");
167 } 167 }
168 168
169 base::Callback<bool(void)> ImplFrameDeadlinePending(bool state) { 169 base::Callback<bool(void)> ImplFrameDeadlinePending(bool state) {
170 return base::Bind(&FakeSchedulerClient::ImplFrameDeadlinePendingCallback, 170 return base::Bind(&FakeSchedulerClient::ImplFrameDeadlinePendingCallback,
(...skipping 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 2639
2640 // At the next BeginFrame, authoritative interval is used instead of previous 2640 // At the next BeginFrame, authoritative interval is used instead of previous
2641 // interval. 2641 // interval.
2642 EXPECT_NE(initial_interval, scheduler_->begin_impl_frame_args().interval); 2642 EXPECT_NE(initial_interval, scheduler_->begin_impl_frame_args().interval);
2643 EXPECT_EQ(authoritative_interval, 2643 EXPECT_EQ(authoritative_interval,
2644 scheduler_->begin_impl_frame_args().interval); 2644 scheduler_->begin_impl_frame_args().interval);
2645 } 2645 }
2646 2646
2647 } // namespace 2647 } // namespace
2648 } // namespace cc 2648 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698