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

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

Issue 221833009: cc: Move scheduling logic out of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@swapAck2Sched11
Patch Set: rebase; add comment about race Created 6 years, 8 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/test/fake_output_surface_client.h ('k') | cc/trees/layer_tree_host_impl.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 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_ 5 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_
6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_ 6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "cc/scheduler/delay_based_time_source.h" 11 #include "cc/scheduler/delay_based_time_source.h"
12 #include "cc/scheduler/frame_rate_controller.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 namespace cc { 14 namespace cc {
16 15
17 class FakeTimeSourceClient : public TimeSourceClient { 16 class FakeTimeSourceClient : public TimeSourceClient {
18 public: 17 public:
19 FakeTimeSourceClient() { Reset(); } 18 FakeTimeSourceClient() { Reset(); }
20 void Reset() { tick_called_ = false; } 19 void Reset() { tick_called_ = false; }
21 bool TickCalled() const { return tick_called_; } 20 bool TickCalled() const { return tick_called_; }
22 21
(...skipping 17 matching lines...) Expand all
40 39
41 protected: 40 protected:
42 FakeDelayBasedTimeSource(base::TimeDelta interval, 41 FakeDelayBasedTimeSource(base::TimeDelta interval,
43 base::SingleThreadTaskRunner* task_runner) 42 base::SingleThreadTaskRunner* task_runner)
44 : DelayBasedTimeSource(interval, task_runner) {} 43 : DelayBasedTimeSource(interval, task_runner) {}
45 virtual ~FakeDelayBasedTimeSource() {} 44 virtual ~FakeDelayBasedTimeSource() {}
46 45
47 base::TimeTicks now_; 46 base::TimeTicks now_;
48 }; 47 };
49 48
50 class FakeFrameRateController : public FrameRateController {
51 public:
52 explicit FakeFrameRateController(scoped_refptr<TimeSource> timer)
53 : FrameRateController(timer) {}
54 };
55
56 } // namespace cc 49 } // namespace cc
57 50
58 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 51 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface_client.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698