diff options
author | cblume <cblume@chromium.org> | 2015-03-26 09:24:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-26 16:25:57 +0000 |
commit | 73a470e3f6319b170f5a60823e9e3787ec711600 (patch) | |
tree | 4762bf0027cf641ce2bcb786016e9642c11fb2a4 | |
parent | c34049f14ab8d830ccd1b4ad5b7a508b1ad9de27 (diff) | |
download | chromium_src-73a470e3f6319b170f5a60823e9e3787ec711600.zip chromium_src-73a470e3f6319b170f5a60823e9e3787ec711600.tar.gz chromium_src-73a470e3f6319b170f5a60823e9e3787ec711600.tar.bz2 |
Adding a metric to track only the checkerboarding.
BUG=466867
Review URL: https://codereview.chromium.org/1010323002
Cr-Commit-Position: refs/heads/master@{#322396}
-rw-r--r-- | cc/debug/rendering_stats.cc | 7 | ||||
-rw-r--r-- | cc/debug/rendering_stats.h | 1 | ||||
-rw-r--r-- | cc/debug/rendering_stats_instrumentation.cc | 9 | ||||
-rw-r--r-- | cc/debug/rendering_stats_instrumentation.h | 1 | ||||
-rw-r--r-- | cc/layers/append_quads_data.h | 5 | ||||
-rw-r--r-- | cc/layers/picture_layer_impl.cc | 2 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 2 |
7 files changed, 25 insertions, 2 deletions
diff --git a/cc/debug/rendering_stats.cc b/cc/debug/rendering_stats.cc index 3a27c1d..582c763 100644 --- a/cc/debug/rendering_stats.cc +++ b/cc/debug/rendering_stats.cc @@ -37,7 +37,8 @@ base::TimeDelta RenderingStats::TimeDeltaList::GetLastTimeDelta() const { RenderingStats::RenderingStats() : frame_count(0), visible_content_area(0), - approximated_visible_content_area(0) { + approximated_visible_content_area(0), + checkerboarded_visible_content_area(0) { } RenderingStats::~RenderingStats() { @@ -51,6 +52,8 @@ RenderingStats::AsTraceableData() const { record_data->SetInteger("visible_content_area", visible_content_area); record_data->SetInteger("approximated_visible_content_area", approximated_visible_content_area); + record_data->SetInteger("checkerboarded_visible_content_area", + checkerboarded_visible_content_area); draw_duration.AddToTracedValue("draw_duration_ms", record_data.get()); draw_duration_estimate.AddToTracedValue("draw_duration_estimate_ms", @@ -74,6 +77,8 @@ void RenderingStats::Add(const RenderingStats& other) { frame_count += other.frame_count; visible_content_area += other.visible_content_area; approximated_visible_content_area += other.approximated_visible_content_area; + checkerboarded_visible_content_area += + other.checkerboarded_visible_content_area; draw_duration.Add(other.draw_duration); draw_duration_estimate.Add(other.draw_duration_estimate); diff --git a/cc/debug/rendering_stats.h b/cc/debug/rendering_stats.h index 1e97be1..cb7ebb2c 100644 --- a/cc/debug/rendering_stats.h +++ b/cc/debug/rendering_stats.h @@ -44,6 +44,7 @@ struct CC_EXPORT RenderingStats { int64 frame_count; int64 visible_content_area; int64 approximated_visible_content_area; + int64 checkerboarded_visible_content_area; TimeDeltaList draw_duration; TimeDeltaList draw_duration_estimate; diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc index 4a28a66..7497c62 100644 --- a/cc/debug/rendering_stats_instrumentation.cc +++ b/cc/debug/rendering_stats_instrumentation.cc @@ -81,6 +81,15 @@ void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea( impl_thread_rendering_stats_.approximated_visible_content_area += area; } +void RenderingStatsInstrumentation::AddCheckerboardedVisibleContentArea( + int64 area) { + if (!record_rendering_stats_) + return; + + base::AutoLock scoped_lock(lock_); + impl_thread_rendering_stats_.checkerboarded_visible_content_area += area; +} + void RenderingStatsInstrumentation::AddDrawDuration( base::TimeDelta draw_duration, base::TimeDelta draw_duration_estimate) { diff --git a/cc/debug/rendering_stats_instrumentation.h b/cc/debug/rendering_stats_instrumentation.h index 8d95929..2a6e3b7 100644 --- a/cc/debug/rendering_stats_instrumentation.h +++ b/cc/debug/rendering_stats_instrumentation.h @@ -43,6 +43,7 @@ class CC_EXPORT RenderingStatsInstrumentation { void IncrementFrameCount(int64 count); void AddVisibleContentArea(int64 area); void AddApproximatedVisibleContentArea(int64 area); + void AddCheckerboardedVisibleContentArea(int64 area); void AddDrawDuration(base::TimeDelta draw_duration, base::TimeDelta draw_duration_estimate); void AddBeginMainFrameToCommitDuration( diff --git a/cc/layers/append_quads_data.h b/cc/layers/append_quads_data.h index 103e1cdd..50f5877 100644 --- a/cc/layers/append_quads_data.h +++ b/cc/layers/append_quads_data.h @@ -15,7 +15,8 @@ struct AppendQuadsData { : num_incomplete_tiles(0), num_missing_tiles(0), visible_content_area(0), - approximated_visible_content_area(0) {} + approximated_visible_content_area(0), + checkerboarded_visible_content_area(0) {} // Set by the layer appending quads. int64 num_incomplete_tiles; @@ -25,6 +26,8 @@ struct AppendQuadsData { int64 visible_content_area; // Set by the layer appending quads. int64 approximated_visible_content_area; + // Set by the layer appending quads. + int64 checkerboarded_visible_content_area; }; } // namespace cc diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index e1b3724..e60d425 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc @@ -351,6 +351,8 @@ void PictureLayerImpl::AppendQuads(RenderPass* render_pass, } append_quads_data->approximated_visible_content_area += visible_geometry_rect.width() * visible_geometry_rect.height(); + append_quads_data->checkerboarded_visible_content_area += + visible_geometry_rect.width() * visible_geometry_rect.height(); continue; } diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 55eec2f..00ae766 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -844,6 +844,8 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses( append_quads_data.visible_content_area); rendering_stats_instrumentation_->AddApproximatedVisibleContentArea( append_quads_data.approximated_visible_content_area); + rendering_stats_instrumentation_->AddCheckerboardedVisibleContentArea( + append_quads_data.checkerboarded_visible_content_area); num_missing_tiles += append_quads_data.num_missing_tiles; num_incomplete_tiles += append_quads_data.num_incomplete_tiles; |