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

Unified Diff: cc/debug/rendering_stats.cc

Issue 258093005: cc: Record statistics about approximated content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix resolution condition. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/debug/rendering_stats.h ('k') | cc/debug/rendering_stats_instrumentation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/rendering_stats.cc
diff --git a/cc/debug/rendering_stats.cc b/cc/debug/rendering_stats.cc
index 5c194c6256f3781b1b4c6241f1102cef7d85312d..3e123b667c774656f88f421225e5f1963ad64f69 100644
--- a/cc/debug/rendering_stats.cc
+++ b/cc/debug/rendering_stats.cc
@@ -33,7 +33,10 @@ void MainThreadRenderingStats::Add(const MainThreadRenderingStats& other) {
ImplThreadRenderingStats::ImplThreadRenderingStats()
: frame_count(0),
- rasterized_pixel_count(0) {}
+ rasterized_pixel_count(0),
+ visible_content_area(0),
+ approximated_visible_content_area(0) {
+}
scoped_refptr<base::debug::ConvertableToTraceFormat>
ImplThreadRenderingStats::AsTraceableData() const {
@@ -41,6 +44,9 @@ ImplThreadRenderingStats::AsTraceableData() const {
record_data->SetInteger("frame_count", frame_count);
record_data->SetDouble("rasterize_time", rasterize_time.InSecondsF());
record_data->SetInteger("rasterized_pixel_count", rasterized_pixel_count);
+ record_data->SetInteger("visible_content_area", visible_content_area);
+ record_data->SetInteger("approximated_visible_content_area",
+ approximated_visible_content_area);
return TracedValue::FromValue(record_data.release());
}
@@ -49,6 +55,8 @@ void ImplThreadRenderingStats::Add(const ImplThreadRenderingStats& other) {
rasterize_time += other.rasterize_time;
analysis_time += other.analysis_time;
rasterized_pixel_count += other.rasterized_pixel_count;
+ visible_content_area += other.visible_content_area;
+ approximated_visible_content_area += other.approximated_visible_content_area;
}
void RenderingStats::Add(const RenderingStats& other) {
« no previous file with comments | « cc/debug/rendering_stats.h ('k') | cc/debug/rendering_stats_instrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698