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

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

Issue 1205483004: cc: Remove unnecessary task runner refptrs from schedulers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_begin_frame_source_constructor
Patch Set: fix surfaces_scheduler compile error Created 5 years, 6 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/scheduler_test_common.h ('k') | components/view_manager/surfaces/surfaces_scheduler.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 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 <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() { 65 TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() {
66 } 66 }
67 67
68 scoped_ptr<TestScheduler> TestScheduler::Create( 68 scoped_ptr<TestScheduler> TestScheduler::Create(
69 base::SimpleTestTickClock* now_src, 69 base::SimpleTestTickClock* now_src,
70 SchedulerClient* client, 70 SchedulerClient* client,
71 const SchedulerSettings& settings, 71 const SchedulerSettings& settings,
72 int layer_tree_host_id, 72 int layer_tree_host_id,
73 const scoped_refptr<OrderedSimpleTaskRunner>& task_runner, 73 OrderedSimpleTaskRunner* task_runner,
74 BeginFrameSource* external_frame_source) { 74 BeginFrameSource* external_frame_source) {
75 scoped_ptr<TestSyntheticBeginFrameSource> synthetic_frame_source; 75 scoped_ptr<TestSyntheticBeginFrameSource> synthetic_frame_source;
76 if (!settings.use_external_begin_frame_source) { 76 if (!settings.use_external_begin_frame_source) {
77 synthetic_frame_source = TestSyntheticBeginFrameSource::Create( 77 synthetic_frame_source = TestSyntheticBeginFrameSource::Create(
78 now_src, task_runner.get(), BeginFrameArgs::DefaultInterval()); 78 now_src, task_runner, BeginFrameArgs::DefaultInterval());
79 } 79 }
80 scoped_ptr<TestBackToBackBeginFrameSource> unthrottled_frame_source = 80 scoped_ptr<TestBackToBackBeginFrameSource> unthrottled_frame_source =
81 TestBackToBackBeginFrameSource::Create(now_src, task_runner.get()); 81 TestBackToBackBeginFrameSource::Create(now_src, task_runner);
82 return make_scoped_ptr(new TestScheduler( 82 return make_scoped_ptr(new TestScheduler(
83 now_src, client, settings, layer_tree_host_id, task_runner, 83 now_src, client, settings, layer_tree_host_id, task_runner,
84 external_frame_source, synthetic_frame_source.Pass(), 84 external_frame_source, synthetic_frame_source.Pass(),
85 unthrottled_frame_source.Pass())); 85 unthrottled_frame_source.Pass()));
86 } 86 }
87 87
88 TestScheduler::TestScheduler( 88 TestScheduler::TestScheduler(
89 base::SimpleTestTickClock* now_src, 89 base::SimpleTestTickClock* now_src,
90 SchedulerClient* client, 90 SchedulerClient* client,
91 const SchedulerSettings& scheduler_settings, 91 const SchedulerSettings& scheduler_settings,
92 int layer_tree_host_id, 92 int layer_tree_host_id,
93 const scoped_refptr<OrderedSimpleTaskRunner>& task_runner, 93 OrderedSimpleTaskRunner* task_runner,
94 BeginFrameSource* external_frame_source, 94 BeginFrameSource* external_frame_source,
95 scoped_ptr<TestSyntheticBeginFrameSource> synthetic_frame_source, 95 scoped_ptr<TestSyntheticBeginFrameSource> synthetic_frame_source,
96 scoped_ptr<TestBackToBackBeginFrameSource> unthrottled_frame_source) 96 scoped_ptr<TestBackToBackBeginFrameSource> unthrottled_frame_source)
97 : Scheduler(client, 97 : Scheduler(client,
98 scheduler_settings, 98 scheduler_settings,
99 layer_tree_host_id, 99 layer_tree_host_id,
100 task_runner, 100 task_runner,
101 external_frame_source, 101 external_frame_source,
102 synthetic_frame_source.Pass(), 102 synthetic_frame_source.Pass(),
103 unthrottled_frame_source.Pass()), 103 unthrottled_frame_source.Pass()),
104 now_src_(now_src) { 104 now_src_(now_src) {
105 } 105 }
106 106
107 base::TimeTicks TestScheduler::Now() const { 107 base::TimeTicks TestScheduler::Now() const {
108 return now_src_->NowTicks(); 108 return now_src_->NowTicks();
109 } 109 }
110 110
111 TestScheduler::~TestScheduler() { 111 TestScheduler::~TestScheduler() {
112 } 112 }
113 113
114 } // namespace cc 114 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | components/view_manager/surfaces/surfaces_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698