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

Unified Diff: cc/test/scheduler_test_common.h

Issue 1765723002: Hoist begin frame sources out of scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_remove_throttle_flag
Patch Set: Address skyostil comments Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/test/scheduler_test_common.h
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index ccc8c263cf5cd756bc605afdd2ce65f3b8c47a0e..259e991880d9e90baafb1bc2660fc7e1a2dff137 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -213,14 +213,13 @@ class FakeCompositorTimingHistory : public CompositorTimingHistory {
class TestScheduler : public Scheduler {
public:
- static scoped_ptr<TestScheduler> Create(
- base::SimpleTestTickClock* now_src,
- SchedulerClient* client,
- const SchedulerSettings& scheduler_settings,
- int layer_tree_host_id,
- OrderedSimpleTaskRunner* task_runner,
- BeginFrameSource* external_frame_source,
- scoped_ptr<CompositorTimingHistory> compositor_timing_history);
+ TestScheduler(base::SimpleTestTickClock* now_src,
+ SchedulerClient* client,
+ const SchedulerSettings& scheduler_settings,
+ int layer_tree_host_id,
+ OrderedSimpleTaskRunner* task_runner,
+ BeginFrameSource* begin_frame_source,
+ scoped_ptr<CompositorTimingHistory> compositor_timing_history);
// Extra test helper functionality
bool IsBeginRetroFrameArgsEmpty() const {
@@ -233,7 +232,7 @@ class TestScheduler : public Scheduler {
return state_machine_.needs_begin_main_frame();
}
- BeginFrameSource& frame_source() { return *frame_source_; }
+ BeginFrameSource& frame_source() { return *begin_frame_source_; }
bool FrameProductionThrottled() {
return settings_.throttle_frame_production;
}
@@ -242,7 +241,7 @@ class TestScheduler : public Scheduler {
return state_machine_.main_thread_missed_last_deadline();
}
- bool begin_frames_expected() const { return observing_frame_source_; }
+ bool begin_frames_expected() const { return observing_begin_frame_source_; }
~TestScheduler() override;
@@ -263,17 +262,6 @@ class TestScheduler : public Scheduler {
base::TimeTicks Now() const override;
private:
- TestScheduler(
- base::SimpleTestTickClock* now_src,
- SchedulerClient* client,
- const SchedulerSettings& scheduler_settings,
- int layer_tree_host_id,
- OrderedSimpleTaskRunner* task_runner,
- BeginFrameSource* external_frame_source,
- scoped_ptr<TestSyntheticBeginFrameSource> synthetic_frame_source,
- scoped_ptr<TestBackToBackBeginFrameSource> unthrottled_frame_source,
- scoped_ptr<CompositorTimingHistory> compositor_timing_history);
-
base::SimpleTestTickClock* now_src_;
DISALLOW_COPY_AND_ASSIGN(TestScheduler);

Powered by Google App Engine
This is Rietveld 408576698