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

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

Issue 1136123009: Remove "mixin" from BeginFrameSource/Observer base classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments Created 5 years, 6 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/surfaces/display_scheduler.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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 base::TimeDelta CommitToActivateDurationEstimate() override { 221 base::TimeDelta CommitToActivateDurationEstimate() override {
222 return commit_to_activate_duration_; 222 return commit_to_activate_duration_;
223 } 223 }
224 224
225 private: 225 private:
226 base::TimeDelta draw_duration_; 226 base::TimeDelta draw_duration_;
227 base::TimeDelta begin_main_frame_to_commit_duration_; 227 base::TimeDelta begin_main_frame_to_commit_duration_;
228 base::TimeDelta commit_to_activate_duration_; 228 base::TimeDelta commit_to_activate_duration_;
229 }; 229 };
230 230
231 class FakeExternalBeginFrameSource : public BeginFrameSourceMixIn { 231 class FakeExternalBeginFrameSource : public BeginFrameSourceBase {
232 public: 232 public:
233 explicit FakeExternalBeginFrameSource(FakeSchedulerClient* client) 233 explicit FakeExternalBeginFrameSource(FakeSchedulerClient* client)
234 : client_(client) {} 234 : client_(client) {}
235 ~FakeExternalBeginFrameSource() override {} 235 ~FakeExternalBeginFrameSource() override {}
236 236
237 void OnNeedsBeginFramesChange(bool needs_begin_frames) override { 237 void OnNeedsBeginFramesChange(bool needs_begin_frames) override {
238 if (needs_begin_frames) { 238 if (needs_begin_frames) {
239 client_->PushAction("SetNeedsBeginFrames(true)"); 239 client_->PushAction("SetNeedsBeginFrames(true)");
240 } else { 240 } else {
241 client_->PushAction("SetNeedsBeginFrames(false)"); 241 client_->PushAction("SetNeedsBeginFrames(false)");
(...skipping 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2998 EXPECT_SCOPED(AdvanceFrame()); 2998 EXPECT_SCOPED(AdvanceFrame());
2999 2999
3000 // At the next BeginFrame, authoritative interval is used instead of previous 3000 // At the next BeginFrame, authoritative interval is used instead of previous
3001 // interval. 3001 // interval.
3002 EXPECT_NE(initial_interval, scheduler_->BeginImplFrameInterval()); 3002 EXPECT_NE(initial_interval, scheduler_->BeginImplFrameInterval());
3003 EXPECT_EQ(authoritative_interval, scheduler_->BeginImplFrameInterval()); 3003 EXPECT_EQ(authoritative_interval, scheduler_->BeginImplFrameInterval());
3004 } 3004 }
3005 3005
3006 } // namespace 3006 } // namespace
3007 } // namespace cc 3007 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/surfaces/display_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698