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

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

Issue 1213653005: Revert of cc: Measure compositor timing with finer granularity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modeTimingHistory3
Patch Set: Created 5 years, 5 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_layer_tree_host_impl_client.h ('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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 private: 160 private:
161 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource); 161 DISALLOW_COPY_AND_ASSIGN(TestSyntheticBeginFrameSource);
162 }; 162 };
163 163
164 class FakeCompositorTimingHistory : public CompositorTimingHistory { 164 class FakeCompositorTimingHistory : public CompositorTimingHistory {
165 public: 165 public:
166 static scoped_ptr<FakeCompositorTimingHistory> Create(); 166 static scoped_ptr<FakeCompositorTimingHistory> Create();
167 ~FakeCompositorTimingHistory() override; 167 ~FakeCompositorTimingHistory() override;
168 168
169 void SetDrawDurationEstimate(base::TimeDelta duration);
169 void SetBeginMainFrameToCommitDurationEstimate(base::TimeDelta duration); 170 void SetBeginMainFrameToCommitDurationEstimate(base::TimeDelta duration);
170 void SetCommitToReadyToActivateDurationEstimate(base::TimeDelta duration); 171 void SetCommitToActivateDurationEstimate(base::TimeDelta duration);
171 void SetPrepareTilesDurationEstimate(base::TimeDelta duration);
172 void SetActivateDurationEstimate(base::TimeDelta duration);
173 void SetDrawDurationEstimate(base::TimeDelta duration);
174 172
173 base::TimeDelta DrawDurationEstimate() const override;
175 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const override; 174 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const override;
176 base::TimeDelta CommitToReadyToActivateDurationEstimate() const override; 175 base::TimeDelta CommitToActivateDurationEstimate() const override;
177 base::TimeDelta PrepareTilesDurationEstimate() const override;
178 base::TimeDelta ActivateDurationEstimate() const override;
179 base::TimeDelta DrawDurationEstimate() const override;
180 176
181 protected: 177 protected:
182 FakeCompositorTimingHistory(scoped_ptr<RenderingStatsInstrumentation> 178 FakeCompositorTimingHistory(scoped_ptr<RenderingStatsInstrumentation>
183 rendering_stats_instrumentation_owned); 179 rendering_stats_instrumentation_owned);
184 180
185 scoped_ptr<RenderingStatsInstrumentation> 181 scoped_ptr<RenderingStatsInstrumentation>
186 rendering_stats_instrumentation_owned_; 182 rendering_stats_instrumentation_owned_;
187 183
184 base::TimeDelta draw_duration_;
188 base::TimeDelta begin_main_frame_to_commit_duration_; 185 base::TimeDelta begin_main_frame_to_commit_duration_;
189 base::TimeDelta commit_to_ready_to_activate_duration_; 186 base::TimeDelta commit_to_activate_duration_;
190 base::TimeDelta prepare_tiles_duration_;
191 base::TimeDelta activate_duration_;
192 base::TimeDelta draw_duration_;
193 187
194 private: 188 private:
195 DISALLOW_COPY_AND_ASSIGN(FakeCompositorTimingHistory); 189 DISALLOW_COPY_AND_ASSIGN(FakeCompositorTimingHistory);
196 }; 190 };
197 191
198 class TestScheduler : public Scheduler { 192 class TestScheduler : public Scheduler {
199 public: 193 public:
200 static scoped_ptr<TestScheduler> Create( 194 static scoped_ptr<TestScheduler> Create(
201 base::SimpleTestTickClock* now_src, 195 base::SimpleTestTickClock* now_src,
202 SchedulerClient* client, 196 SchedulerClient* client,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 scoped_ptr<CompositorTimingHistory> compositor_timing_history); 233 scoped_ptr<CompositorTimingHistory> compositor_timing_history);
240 234
241 base::SimpleTestTickClock* now_src_; 235 base::SimpleTestTickClock* now_src_;
242 236
243 DISALLOW_COPY_AND_ASSIGN(TestScheduler); 237 DISALLOW_COPY_AND_ASSIGN(TestScheduler);
244 }; 238 };
245 239
246 } // namespace cc 240 } // namespace cc
247 241
248 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 242 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/scheduler_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698