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

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

Issue 1681393003: cc: Add MainAndImplFrameTimeDelta UMA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - active_tree_needs_first_draw_ = true Created 4 years, 10 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') | cc/trees/proxy_impl.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 return now_src_->NowTicks(); 60 return now_src_->NowTicks();
61 } 61 }
62 62
63 TestSyntheticBeginFrameSource::TestSyntheticBeginFrameSource( 63 TestSyntheticBeginFrameSource::TestSyntheticBeginFrameSource(
64 scoped_ptr<DelayBasedTimeSource> time_source) 64 scoped_ptr<DelayBasedTimeSource> time_source)
65 : SyntheticBeginFrameSource(std::move(time_source)) {} 65 : SyntheticBeginFrameSource(std::move(time_source)) {}
66 66
67 TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() { 67 TestSyntheticBeginFrameSource::~TestSyntheticBeginFrameSource() {
68 } 68 }
69 69
70 scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create() { 70 scoped_ptr<FakeCompositorTimingHistory> FakeCompositorTimingHistory::Create(
71 bool using_synchronous_renderer_compositor) {
71 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation = 72 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation =
72 RenderingStatsInstrumentation::Create(); 73 RenderingStatsInstrumentation::Create();
73 return make_scoped_ptr(new FakeCompositorTimingHistory( 74 return make_scoped_ptr(new FakeCompositorTimingHistory(
75 using_synchronous_renderer_compositor,
74 std::move(rendering_stats_instrumentation))); 76 std::move(rendering_stats_instrumentation)));
75 } 77 }
76 78
77 FakeCompositorTimingHistory::FakeCompositorTimingHistory( 79 FakeCompositorTimingHistory::FakeCompositorTimingHistory(
80 bool using_synchronous_renderer_compositor,
78 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation) 81 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation)
79 : CompositorTimingHistory(CompositorTimingHistory::NULL_UMA, 82 : CompositorTimingHistory(using_synchronous_renderer_compositor,
83 CompositorTimingHistory::NULL_UMA,
80 rendering_stats_instrumentation.get()), 84 rendering_stats_instrumentation.get()),
81 rendering_stats_instrumentation_owned_( 85 rendering_stats_instrumentation_owned_(
82 std::move(rendering_stats_instrumentation)) {} 86 std::move(rendering_stats_instrumentation)) {}
83 87
84 FakeCompositorTimingHistory::~FakeCompositorTimingHistory() { 88 FakeCompositorTimingHistory::~FakeCompositorTimingHistory() {
85 } 89 }
86 90
87 void FakeCompositorTimingHistory::SetAllEstimatesTo(base::TimeDelta duration) { 91 void FakeCompositorTimingHistory::SetAllEstimatesTo(base::TimeDelta duration) {
88 begin_main_frame_to_commit_duration_ = duration; 92 begin_main_frame_to_commit_duration_ = duration;
89 begin_main_frame_queue_duration_critical_ = duration; 93 begin_main_frame_queue_duration_critical_ = duration;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 now_src_(now_src) {} 224 now_src_(now_src) {}
221 225
222 base::TimeTicks TestScheduler::Now() const { 226 base::TimeTicks TestScheduler::Now() const {
223 return now_src_->NowTicks(); 227 return now_src_->NowTicks();
224 } 228 }
225 229
226 TestScheduler::~TestScheduler() { 230 TestScheduler::~TestScheduler() {
227 } 231 }
228 232
229 } // namespace cc 233 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/trees/proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698