summaryrefslogtreecommitdiffstats
path: root/cc/debug/rendering_stats_instrumentation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/debug/rendering_stats_instrumentation.cc')
-rw-r--r--cc/debug/rendering_stats_instrumentation.cc17
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