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

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

Issue 2659123004: cc: Add scheduler support for invalidating content on impl thread. (Closed)
Patch Set: tests Created 3 years, 10 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 void ScheduledActionPrepareTiles() override { 165 void ScheduledActionPrepareTiles() override {
166 PushAction("ScheduledActionPrepareTiles"); 166 PushAction("ScheduledActionPrepareTiles");
167 scheduler_->WillPrepareTiles(); 167 scheduler_->WillPrepareTiles();
168 scheduler_->DidPrepareTiles(); 168 scheduler_->DidPrepareTiles();
169 } 169 }
170 void ScheduledActionInvalidateCompositorFrameSink() override { 170 void ScheduledActionInvalidateCompositorFrameSink() override {
171 actions_.push_back("ScheduledActionInvalidateCompositorFrameSink"); 171 actions_.push_back("ScheduledActionInvalidateCompositorFrameSink");
172 states_.push_back(scheduler_->AsValue()); 172 states_.push_back(scheduler_->AsValue());
173 } 173 }
174 void ScheduledActionPerformImplSideInvalidation() override {
175 PushAction("ScheduledActionPerformImplSideInvalidation");
176 }
174 177
175 void SendBeginMainFrameNotExpectedSoon() override { 178 void SendBeginMainFrameNotExpectedSoon() override {
176 PushAction("SendBeginMainFrameNotExpectedSoon"); 179 PushAction("SendBeginMainFrameNotExpectedSoon");
177 } 180 }
178 181
179 bool IsInsideBeginImplFrame() const { return inside_begin_impl_frame_; } 182 bool IsInsideBeginImplFrame() const { return inside_begin_impl_frame_; }
180 183
181 base::Callback<bool(void)> InsideBeginImplFrame(bool state) { 184 base::Callback<bool(void)> InsideBeginImplFrame(bool state) {
182 return base::Bind(&FakeSchedulerClient::InsideBeginImplFrameCallback, 185 return base::Bind(&FakeSchedulerClient::InsideBeginImplFrameCallback,
183 base::Unretained(this), state); 186 base::Unretained(this), state);
(...skipping 3067 matching lines...) Expand 10 before | Expand all | Expand 10 after
3251 } 3254 }
3252 3255
3253 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) { 3256 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) {
3254 EXPECT_FALSE(BeginMainFrameOnCriticalPath( 3257 EXPECT_FALSE(BeginMainFrameOnCriticalPath(
3255 SMOOTHNESS_TAKES_PRIORITY, 3258 SMOOTHNESS_TAKES_PRIORITY,
3256 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration)); 3259 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration));
3257 } 3260 }
3258 3261
3259 } // namespace 3262 } // namespace
3260 } // namespace cc 3263 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698