diff options
author | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 05:29:22 +0000 |
---|---|---|
committer | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 05:29:22 +0000 |
commit | 2bc19e5326705d8f94e927d026cf18d3538ddb45 (patch) | |
tree | 432675b0566c5b6c89fe65eb62cfd6e1f6b52400 /cc/debug/rendering_stats_instrumentation.cc | |
parent | 2fad0960a52b84e195f57d5bd73980f6e8fc0546 (diff) | |
download | chromium_src-2bc19e5326705d8f94e927d026cf18d3538ddb45.zip chromium_src-2bc19e5326705d8f94e927d026cf18d3538ddb45.tar.gz chromium_src-2bc19e5326705d8f94e927d026cf18d3538ddb45.tar.bz2 |
cc: Record statistics about approximated content.
Record the total visible content area and the approximated visible content
area. Approximated area is the visible area covered by low-res or missing tiles.
These statistics will be used in a follow-up patch to report the percentage of
pixels that were approximated in smoothness benchmark.
R=vmpstr@chromium.org,enne@chromium.org,
BUG=308652
Review URL: https://codereview.chromium.org/258093005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug/rendering_stats_instrumentation.cc')
-rw-r--r-- | cc/debug/rendering_stats_instrumentation.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc index 63840a3..36893f8 100644 --- a/cc/debug/rendering_stats_instrumentation.cc +++ b/cc/debug/rendering_stats_instrumentation.cc @@ -108,4 +108,21 @@ void RenderingStatsInstrumentation::AddAnalysis(base::TimeDelta duration, impl_stats_.analysis_time += duration; } +void RenderingStatsInstrumentation::AddVisibleContentArea(int64 area) { + if (!record_rendering_stats_) + return; + + base::AutoLock scoped_lock(lock_); + impl_stats_.visible_content_area += area; +} + +void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea( + int64 area) { + if (!record_rendering_stats_) + return; + + base::AutoLock scoped_lock(lock_); + impl_stats_.approximated_visible_content_area += area; +} + } // namespace cc |