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

Side by Side Diff: cc/test/scheduler_test_common.cc

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Scheduler now uses frame sources, working on scheduler_unittests. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/test/scheduler_test_common.h" 5 #include "cc/test/scheduler_test_common.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 void FakeTimeSourceClient::OnTimerTick() { 11 void FakeTimeSourceClient::OnTimerTick() {
12 tick_called_ = true; 12 tick_called_ = true;
13 } 13 }
14 14
15 base::TimeTicks FakeDelayBasedTimeSource::Now() const { return now_; } 15 base::TimeTicks FakeDelayBasedTimeSource::Now() const { return now_; }
16 16
17 DrawSwapReadbackResult
18 StubSchedulerClient::ScheduledActionDrawAndSwapIfPossible() {
19 return DrawSwapReadbackResult(
20 DrawSwapReadbackResult::DRAW_SUCCESS, false, false);
21 }
22 DrawSwapReadbackResult StubSchedulerClient::ScheduledActionDrawAndSwapForced() {
23 return DrawSwapReadbackResult(
24 DrawSwapReadbackResult::DRAW_SUCCESS, false, false);
25 }
26 DrawSwapReadbackResult StubSchedulerClient::ScheduledActionDrawAndReadback() {
27 return DrawSwapReadbackResult(
28 DrawSwapReadbackResult::DRAW_SUCCESS, false, false);
29 }
30 base::TimeDelta StubSchedulerClient::DrawDurationEstimate() {
31 return base::TimeDelta::FromMilliseconds(4);
32 }
33 base::TimeDelta StubSchedulerClient::BeginMainFrameToCommitDurationEstimate() {
34 return base::TimeDelta::FromMilliseconds(3);
35 }
36 base::TimeDelta StubSchedulerClient::CommitToActivateDurationEstimate() {
37 return base::TimeDelta::FromMilliseconds(2);
38 }
39
17 } // namespace cc 40 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698