Commit 76f34770 authored by jdduke's avatar jdduke Committed by Commit bot

Trace background/visibility events

Trace the following events:
 * CompositorImplAndroid::SetVisility
 * RenderWidgetHost::WasHidden
 * RenderWidgetHost::WasShown
 * RenderProcessHostImpl::SetBackgrounded

These events give greater context to content behavior with respect
to visibility changes.

BUG=466213

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

Cr-Commit-Position: refs/heads/master@{#322306}
parent 0a61f800
...@@ -438,6 +438,7 @@ void CompositorImpl::CreateLayerTreeHost() { ...@@ -438,6 +438,7 @@ void CompositorImpl::CreateLayerTreeHost() {
} }
void CompositorImpl::SetVisible(bool visible) { void CompositorImpl::SetVisible(bool visible) {
TRACE_EVENT1("cc", "CompositorImpl::SetVisible", "visible", visible);
if (!visible) { if (!visible) {
DCHECK(host_); DCHECK(host_);
// Look for any layers that were attached to the root for readback // Look for any layers that were attached to the root for readback
......
...@@ -2223,6 +2223,8 @@ void RenderProcessHostImpl::OnDumpHandlesDone() { ...@@ -2223,6 +2223,8 @@ void RenderProcessHostImpl::OnDumpHandlesDone() {
} }
void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) { void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) {
TRACE_EVENT1("renderer_host", "RenderProcessHostImpl::SetBackgrounded",
"backgrounded", backgrounded);
// Note: we always set the backgrounded_ value. If the process is NULL // Note: we always set the backgrounded_ value. If the process is NULL
// (and hence hasn't been created yet), we will set the process priority // (and hence hasn't been created yet), we will set the process priority
// later when we create the process. // later when we create the process.
......
...@@ -511,6 +511,7 @@ void RenderWidgetHostImpl::WasHidden() { ...@@ -511,6 +511,7 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_) if (is_hidden_)
return; return;
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
is_hidden_ = true; is_hidden_ = true;
// Don't bother reporting hung state when we aren't active. // Don't bother reporting hung state when we aren't active.
...@@ -533,6 +534,8 @@ void RenderWidgetHostImpl::WasHidden() { ...@@ -533,6 +534,8 @@ void RenderWidgetHostImpl::WasHidden() {
void RenderWidgetHostImpl::WasShown(const ui::LatencyInfo& latency_info) { void RenderWidgetHostImpl::WasShown(const ui::LatencyInfo& latency_info) {
if (!is_hidden_) if (!is_hidden_)
return; return;
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasShown");
is_hidden_ = false; is_hidden_ = false;
SendScreenRects(); SendScreenRects();
......
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