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

Side by Side Diff: cc/debug/rendering_stats_instrumentation.cc

Issue 363003002: Add duration estimation data to RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ImplThreadRenderingStatsAccumulated Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/debug/rendering_stats_instrumentation.h" 5 #include "cc/debug/rendering_stats_instrumentation.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 // static 9 // static
10 scoped_ptr<RenderingStatsInstrumentation> 10 scoped_ptr<RenderingStatsInstrumentation>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea( 133 void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea(
134 int64 area) { 134 int64 area) {
135 if (!record_rendering_stats_) 135 if (!record_rendering_stats_)
136 return; 136 return;
137 137
138 base::AutoLock scoped_lock(lock_); 138 base::AutoLock scoped_lock(lock_);
139 impl_thread_rendering_stats_.approximated_visible_content_area += area; 139 impl_thread_rendering_stats_.approximated_visible_content_area += area;
140 } 140 }
141 141
142 void RenderingStatsInstrumentation::AddDrawDuration(
143 base::TimeDelta draw_duration,
144 base::TimeDelta draw_duration_estimate) {
145 if (!record_rendering_stats_)
146 return;
147
148 base::AutoLock scoped_lock(lock_);
149 impl_thread_rendering_stats_.draw_duration.Append(draw_duration);
150 impl_thread_rendering_stats_.draw_duration_estimate.Append(
151 draw_duration_estimate);
152 }
153
154 void RenderingStatsInstrumentation::AddBeginMainFrameToCommitDuration(
155 base::TimeDelta begin_main_frame_to_commit_duration,
156 base::TimeDelta begin_main_frame_to_commit_duration_estimate) {
157 if (!record_rendering_stats_)
158 return;
159
160 base::AutoLock scoped_lock(lock_);
161 impl_thread_rendering_stats_.begin_main_frame_to_commit_duration.Append(
162 begin_main_frame_to_commit_duration);
163 impl_thread_rendering_stats_.begin_main_frame_to_commit_duration_estimate
164 .Append(begin_main_frame_to_commit_duration_estimate);
165 }
166
167 void RenderingStatsInstrumentation::AddCommitToActivateDuration(
168 base::TimeDelta commit_to_activate_duration,
169 base::TimeDelta commit_to_activate_duration_estimate) {
170 if (!record_rendering_stats_)
171 return;
172
173 base::AutoLock scoped_lock(lock_);
174 impl_thread_rendering_stats_.commit_to_activate_duration.Append(
175 commit_to_activate_duration);
176 impl_thread_rendering_stats_.commit_to_activate_duration_estimate.Append(
177 commit_to_activate_duration_estimate);
178 }
179
142 } // namespace cc 180 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698