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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void RenderingStatsInstrumentation::AddRecord(base::TimeDelta duration, 92 void RenderingStatsInstrumentation::AddRecord(base::TimeDelta duration,
93 int64 pixels) { 93 int64 pixels) {
94 if (!record_rendering_stats_) 94 if (!record_rendering_stats_)
95 return; 95 return;
96 96
97 base::AutoLock scoped_lock(lock_); 97 base::AutoLock scoped_lock(lock_);
98 main_thread_rendering_stats_.record_time += duration; 98 main_thread_rendering_stats_.record_time += duration;
99 main_thread_rendering_stats_.recorded_pixel_count += pixels; 99 main_thread_rendering_stats_.recorded_pixel_count += pixels;
100 } 100 }
101 101
102 void RenderingStatsInstrumentation::AddRaster(base::TimeDelta duration,
103 int64 pixels) {
104 if (!record_rendering_stats_)
105 return;
106
107 base::AutoLock scoped_lock(lock_);
108 impl_thread_rendering_stats_.rasterize_time += duration;
109 impl_thread_rendering_stats_.rasterized_pixel_count += pixels;
110 }
111
112 void RenderingStatsInstrumentation::AddAnalysis(base::TimeDelta duration,
113 int64 pixels) {
114 if (!record_rendering_stats_)
115 return;
116
117 base::AutoLock scoped_lock(lock_);
118 impl_thread_rendering_stats_.analysis_time += duration;
119 }
120
121 void RenderingStatsInstrumentation::AddVisibleContentArea(int64 area) { 102 void RenderingStatsInstrumentation::AddVisibleContentArea(int64 area) {
122 if (!record_rendering_stats_) 103 if (!record_rendering_stats_)
123 return; 104 return;
124 105
125 base::AutoLock scoped_lock(lock_); 106 base::AutoLock scoped_lock(lock_);
126 impl_thread_rendering_stats_.visible_content_area += area; 107 impl_thread_rendering_stats_.visible_content_area += area;
127 } 108 }
128 109
129 void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea( 110 void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea(
130 int64 area) { 111 int64 area) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return; 148 return;
168 149
169 base::AutoLock scoped_lock(lock_); 150 base::AutoLock scoped_lock(lock_);
170 impl_thread_rendering_stats_.commit_to_activate_duration.Append( 151 impl_thread_rendering_stats_.commit_to_activate_duration.Append(
171 commit_to_activate_duration); 152 commit_to_activate_duration);
172 impl_thread_rendering_stats_.commit_to_activate_duration_estimate.Append( 153 impl_thread_rendering_stats_.commit_to_activate_duration_estimate.Append(
173 commit_to_activate_duration_estimate); 154 commit_to_activate_duration_estimate);
174 } 155 }
175 156
176 } // namespace cc 157 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.h ('k') | cc/layers/delegated_renderer_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698