OLD | NEW |
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.h" | 10 #include "base/time.h" |
11 #include "cc/base/thread.h" | |
12 #include "cc/scheduler/delay_based_time_source.h" | 11 #include "cc/scheduler/delay_based_time_source.h" |
13 #include "cc/scheduler/frame_rate_controller.h" | 12 #include "cc/scheduler/frame_rate_controller.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
15 | 14 |
16 namespace cc { | 15 namespace cc { |
17 | 16 |
18 class FakeTimeSourceClient : public cc::TimeSourceClient { | 17 class FakeTimeSourceClient : public cc::TimeSourceClient { |
19 public: | 18 public: |
20 FakeTimeSourceClient() { Reset(); } | 19 FakeTimeSourceClient() { Reset(); } |
21 void Reset() { tick_called_ = false; } | 20 void Reset() { tick_called_ = false; } |
(...skipping 30 matching lines...) Expand all Loading... |
52 public: | 51 public: |
53 explicit FakeFrameRateController(scoped_refptr<cc::TimeSource> timer) | 52 explicit FakeFrameRateController(scoped_refptr<cc::TimeSource> timer) |
54 : cc::FrameRateController(timer) {} | 53 : cc::FrameRateController(timer) {} |
55 | 54 |
56 int NumFramesPending() const { return num_frames_pending_; } | 55 int NumFramesPending() const { return num_frames_pending_; } |
57 }; | 56 }; |
58 | 57 |
59 } // namespace cc | 58 } // namespace cc |
60 | 59 |
61 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ | 60 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ |
OLD | NEW |