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

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

Issue 1840223002: cc: Remove BeginFrameSource::Create methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test BFS and mus too Created 4 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/surfaces/onscreen_display_client.cc ('k') | cc/test/scheduler_test_common.cc » ('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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void AsValueInto(base::trace_event::TracedValue* dict) const override; 111 void AsValueInto(base::trace_event::TracedValue* dict) const override;
112 112
113 using BeginFrameSourceBase::SetBeginFrameSourcePaused; 113 using BeginFrameSourceBase::SetBeginFrameSourcePaused;
114 114
115 private: 115 private:
116 DISALLOW_COPY_AND_ASSIGN(FakeBeginFrameSource); 116 DISALLOW_COPY_AND_ASSIGN(FakeBeginFrameSource);
117 }; 117 };
118 118
119 class TestBackToBackBeginFrameSource : public BackToBackBeginFrameSource { 119 class TestBackToBackBeginFrameSource : public BackToBackBeginFrameSource {
120 public: 120 public:
121 TestBackToBackBeginFrameSource(base::SimpleTestTickClock* now_src,
122 base::SingleThreadTaskRunner* task_runner);
121 ~TestBackToBackBeginFrameSource() override; 123 ~TestBackToBackBeginFrameSource() override;
122 124
123 static scoped_ptr<TestBackToBackBeginFrameSource> Create(
124 base::SimpleTestTickClock* now_src,
125 base::SingleThreadTaskRunner* task_runner) {
126 return make_scoped_ptr(
127 new TestBackToBackBeginFrameSource(now_src, task_runner));
128 }
129
130 protected: 125 protected:
131 TestBackToBackBeginFrameSource(base::SimpleTestTickClock* now_src,
132 base::SingleThreadTaskRunner* task_runner);
133
134 base::TimeTicks Now() override; 126 base::TimeTicks Now() override;
135 // Not owned. 127 // Not owned.
136 base::SimpleTestTickClock* now_src_; 128 base::SimpleTestTickClock* now_src_;
137 129
138 private: 130 private:
139 DISALLOW_COPY_AND_ASSIGN(TestBackToBackBeginFrameSource); 131 DISALLOW_COPY_AND_ASSIGN(TestBackToBackBeginFrameSource);
140 }; 132 };
141 133
142 class TestSyntheticBeginFrameSource : public SyntheticBeginFrameSource { 134 class TestSyntheticBeginFrameSource : public SyntheticBeginFrameSource {
143 public: 135 public:
136 explicit TestSyntheticBeginFrameSource(base::SimpleTestTickClock* now_src,
137 OrderedSimpleTaskRunner* task_runner,
138 base::TimeDelta initial_interval);
144 ~TestSyntheticBeginFrameSource() override; 139 ~TestSyntheticBeginFrameSource() override;
145 140
146 static scoped_ptr<TestSyntheticBeginFrameSource> Create(
147 base::SimpleTestTickClock* now_src,
148 OrderedSimpleTaskRunner* task_runner,
149 base::TimeDelta initial_interval) {
150 scoped_ptr<TestDelayBasedTimeSource> time_source =
151 TestDelayBasedTimeSource::Create(now_src, initial_interval,
152 task_runner);
153 return make_scoped_ptr(
154 new TestSyntheticBeginFrameSource(std::move(time_source)));
155 }
156
157 protected:
158 explicit TestSyntheticBeginFrameSource(
159 scoped_ptr<DelayBasedTimeSource> time_source);
160
161 private: 141 private:
162 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource); 142 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource);
163 }; 143 };
164 144
165 class FakeCompositorTimingHistory : public CompositorTimingHistory { 145 class FakeCompositorTimingHistory : public CompositorTimingHistory {
166 public: 146 public:
167 static scoped_ptr<FakeCompositorTimingHistory> Create( 147 static scoped_ptr<FakeCompositorTimingHistory> Create(
168 bool using_synchronous_renderer_compositor); 148 bool using_synchronous_renderer_compositor);
169 ~FakeCompositorTimingHistory() override; 149 ~FakeCompositorTimingHistory() override;
170 150
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 242
263 private: 243 private:
264 base::SimpleTestTickClock* now_src_; 244 base::SimpleTestTickClock* now_src_;
265 245
266 DISALLOW_COPY_AND_ASSIGN(TestScheduler); 246 DISALLOW_COPY_AND_ASSIGN(TestScheduler);
267 }; 247 };
268 248
269 } // namespace cc 249 } // namespace cc
270 250
271 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 251 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/surfaces/onscreen_display_client.cc ('k') | cc/test/scheduler_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698