Only Record Ugliness Histogram for Compositor Side Changes

Set up a counter in LayerTreeImpl to indicate whether a recent frame has
been pushed from main thread. Since missing and incomplete tiles are
compositor side concept, only track those numbers on compositor side.

BUG=381695

Review URL: https://codereview.chromium.org/411693004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285010 0039d316-1c4b-4281-b951-d872f2087c98
parent 5c0f9531
......@@ -377,6 +377,8 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
sync_tree->ResetContentsTexturesPurged();
}
sync_tree->set_has_ever_been_drawn(false);
micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl);
}
......
......@@ -924,7 +924,7 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(
// If we're making a frame to draw, it better have at least one render pass.
DCHECK(!frame->render_passes.empty());
if (IsCurrentlyScrolling()) {
if (active_tree_->has_ever_been_drawn()) {
UMA_HISTOGRAM_COUNTS_100(
"Compositing.RenderPass.AppendQuadData.NumMissingTiles",
num_missing_tiles);
......@@ -1524,6 +1524,7 @@ void LayerTreeHostImpl::DrawLayers(FrameData* frame,
}
active_tree_->root_layer()->ResetAllChangeTrackingForSubtree();
active_tree_->set_has_ever_been_drawn(true);
devtools_instrumentation::DidDrawFrame(id_);
benchmark_instrumentation::IssueImplThreadRenderingStatsEvent(
rendering_stats_instrumentation_->impl_thread_rendering_stats());
......
......@@ -90,6 +90,7 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl)
needs_update_draw_properties_(true),
needs_full_tree_sync_(true),
next_activation_forces_redraw_(false),
has_ever_been_drawn_(false),
render_surface_layer_list_id_(0) {
}
......@@ -237,6 +238,8 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->root_layer(), hud_layer()->id())));
else
target_tree->set_hud_layer(NULL);
target_tree->has_ever_been_drawn_ = false;
}
LayerImpl* LayerTreeImpl::InnerViewportContainerLayer() const {
......
......@@ -188,6 +188,11 @@ class CC_EXPORT LayerTreeImpl {
void ForceRedrawNextActivation() { next_activation_forces_redraw_ = true; }
void set_has_ever_been_drawn(bool has_drawn) {
has_ever_been_drawn_ = has_drawn;
}
bool has_ever_been_drawn() const { return has_ever_been_drawn_; }
void set_ui_resource_request_queue(const UIResourceRequestQueue& queue);
const LayerImplList& RenderSurfaceLayerList() const;
......@@ -330,6 +335,8 @@ class CC_EXPORT LayerTreeImpl {
bool next_activation_forces_redraw_;
bool has_ever_been_drawn_;
ScopedPtrVector<SwapPromise> swap_promise_list_;
UIResourceRequestQueue ui_resource_request_queue_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment