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

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

Issue 25284005: cc: Add best_record_time to rendering stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 2 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/debug/rendering_stats_instrumentation.h ('k') | cc/resources/picture.h » ('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 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 int64 pixels) { 98 int64 pixels) {
99 if (!record_rendering_stats_) 99 if (!record_rendering_stats_)
100 return; 100 return;
101 101
102 base::AutoLock scoped_lock(lock_); 102 base::AutoLock scoped_lock(lock_);
103 main_stats_.paint_time += duration; 103 main_stats_.paint_time += duration;
104 main_stats_.painted_pixel_count += pixels; 104 main_stats_.painted_pixel_count += pixels;
105 } 105 }
106 106
107 void RenderingStatsInstrumentation::AddRecord(base::TimeDelta duration, 107 void RenderingStatsInstrumentation::AddRecord(base::TimeDelta duration,
108 base::TimeDelta best_duration,
108 int64 pixels) { 109 int64 pixels) {
109 if (!record_rendering_stats_) 110 if (!record_rendering_stats_)
110 return; 111 return;
111 112
112 base::AutoLock scoped_lock(lock_); 113 base::AutoLock scoped_lock(lock_);
113 main_stats_.record_time += duration; 114 main_stats_.record_time += duration;
115 main_stats_.best_record_time += best_duration;
114 main_stats_.recorded_pixel_count += pixels; 116 main_stats_.recorded_pixel_count += pixels;
115 } 117 }
116 118
117 void RenderingStatsInstrumentation::AddRaster(base::TimeDelta total_duration, 119 void RenderingStatsInstrumentation::AddRaster(base::TimeDelta total_duration,
118 base::TimeDelta best_duration, 120 base::TimeDelta best_duration,
119 int64 pixels, 121 int64 pixels,
120 bool is_in_pending_tree_now_bin) { 122 bool is_in_pending_tree_now_bin) {
121 if (!record_rendering_stats_) 123 if (!record_rendering_stats_)
122 return; 124 return;
123 125
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 return; 201 return;
200 202
201 base::AutoLock scoped_lock(lock_); 203 base::AutoLock scoped_lock(lock_);
202 impl_stats_.tile_analysis_count++; 204 impl_stats_.tile_analysis_count++;
203 impl_stats_.tile_analysis_time += duration; 205 impl_stats_.tile_analysis_time += duration;
204 if (is_solid_color) 206 if (is_solid_color)
205 impl_stats_.solid_color_tile_analysis_count++; 207 impl_stats_.solid_color_tile_analysis_count++;
206 } 208 }
207 209
208 } // namespace cc 210 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.h ('k') | cc/resources/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698