diff options
author | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-09 04:04:09 +0000 |
---|---|---|
committer | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-09 04:04:09 +0000 |
commit | 922c6e1ff0af52496f5c33f9adef9d7944c02147 (patch) | |
tree | 722edd95e8d63eebaa3f9e84023a32c8fad1830a /cc/debug/rendering_stats_instrumentation.cc | |
parent | 6286a3798e51456de431d03d184a2f13ee5f2545 (diff) | |
download | chromium_src-922c6e1ff0af52496f5c33f9adef9d7944c02147.zip chromium_src-922c6e1ff0af52496f5c33f9adef9d7944c02147.tar.gz chromium_src-922c6e1ff0af52496f5c33f9adef9d7944c02147.tar.bz2 |
cc: Removed unused metrics from RenderingStats.
- Removed everything except for frame count, paint/record/rasterize time and
pixel count.
- Cleaned up variable naming.
- Removed RasterStats struct. Replaced by direct usage of
RenderingStatsInstrumentation.
R=nduca@chromium.org
BUG=234308,280638
Review URL: https://codereview.chromium.org/26031002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug/rendering_stats_instrumentation.cc')
-rw-r--r-- | cc/debug/rendering_stats_instrumentation.cc | 122 |
1 files changed, 7 insertions, 115 deletions
diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc index a423ecc..3987b7e 100644 --- a/cc/debug/rendering_stats_instrumentation.cc +++ b/cc/debug/rendering_stats_instrumentation.cc @@ -57,41 +57,16 @@ base::TimeDelta RenderingStatsInstrumentation::EndRecording( return base::TimeDelta(); } -void RenderingStatsInstrumentation::IncrementAnimationFrameCount() { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - main_stats_.animation_frame_count++; -} - -void RenderingStatsInstrumentation::IncrementScreenFrameCount( - int64 count, bool main_thread) { +void RenderingStatsInstrumentation::IncrementFrameCount(int64 count, + bool main_thread) { if (!record_rendering_stats_) return; base::AutoLock scoped_lock(lock_); if (main_thread) - main_stats_.screen_frame_count += count; + main_stats_.frame_count += count; else - impl_stats_.screen_frame_count += count; -} - -void RenderingStatsInstrumentation::IncrementDroppedFrameCount(int64 count) { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.dropped_frame_count += count; -} - -void RenderingStatsInstrumentation::AddCommit(base::TimeDelta duration) { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - main_stats_.commit_time += duration; - main_stats_.commit_count++; + impl_stats_.frame_count += count; } void RenderingStatsInstrumentation::AddPaint(base::TimeDelta duration, @@ -105,106 +80,23 @@ void RenderingStatsInstrumentation::AddPaint(base::TimeDelta duration, } void RenderingStatsInstrumentation::AddRecord(base::TimeDelta duration, - base::TimeDelta best_duration, int64 pixels) { if (!record_rendering_stats_) return; base::AutoLock scoped_lock(lock_); main_stats_.record_time += duration; - main_stats_.best_record_time += best_duration; main_stats_.recorded_pixel_count += pixels; } -void RenderingStatsInstrumentation::AddRaster(base::TimeDelta total_duration, - base::TimeDelta best_duration, - int64 pixels, - bool is_in_pending_tree_now_bin) { +void RenderingStatsInstrumentation::AddRaster(base::TimeDelta duration, + int64 pixels) { if (!record_rendering_stats_) return; base::AutoLock scoped_lock(lock_); - impl_stats_.rasterize_time += total_duration; - impl_stats_.best_rasterize_time += best_duration; + impl_stats_.rasterize_time += duration; impl_stats_.rasterized_pixel_count += pixels; - - if (is_in_pending_tree_now_bin) { - impl_stats_.rasterize_time_for_now_bins_on_pending_tree += - total_duration; - } -} - -void RenderingStatsInstrumentation::IncrementImplThreadScrolls() { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.impl_thread_scroll_count++; -} - -void RenderingStatsInstrumentation::IncrementMainThreadScrolls() { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.main_thread_scroll_count++; -} - -void RenderingStatsInstrumentation::AddLayersDrawn(int64 amount) { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.drawn_layer_count += amount; -} - -void RenderingStatsInstrumentation::AddMissingTiles(int64 amount) { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.missing_tile_count += amount; -} - -void RenderingStatsInstrumentation::AddDeferredImageDecode( - base::TimeDelta duration) { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.deferred_image_decode_time += duration; - impl_stats_.deferred_image_decode_count++; -} - -void RenderingStatsInstrumentation::AddImageGathering( - base::TimeDelta duration) { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - main_stats_.image_gathering_time += duration; - main_stats_.image_gathering_count++; -} - -void RenderingStatsInstrumentation::IncrementDeferredImageCacheHitCount() { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.deferred_image_cache_hit_count++; -} - -void RenderingStatsInstrumentation::AddAnalysisResult( - base::TimeDelta duration, - bool is_solid_color) { - if (!record_rendering_stats_) - return; - - base::AutoLock scoped_lock(lock_); - impl_stats_.tile_analysis_count++; - impl_stats_.tile_analysis_time += duration; - if (is_solid_color) - impl_stats_.solid_color_tile_analysis_count++; } } // namespace cc |