Commit f666352f authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

chromeos: adds trace events for resizing top-levels

This makes it easier to correlate changes in ash with that in the browser.

BUG=951015
TEST=none

Change-Id: I3d0ce9f15a69cd83f837b2ea10f6dc1f1c0f8d56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562754Reviewed-by: default avatarJun Mukai <mukai@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649709}
parent b5bb6add
......@@ -8,6 +8,7 @@
#include "base/callback_forward.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
#include "components/viz/common/surfaces/surface_info.h"
#include "components/viz/host/host_frame_sink_manager.h"
#include "services/ws/client_change.h"
......@@ -331,6 +332,9 @@ void ClientRoot::HandleBoundsOrScaleFactorChange() {
void ClientRoot::NotifyClientOfNewBounds() {
last_bounds_ = GetBoundsToSend(window_);
auto id = ProxyWindow::GetMayBeNull(window_)->local_surface_id_allocation();
TRACE_EVENT_WITH_FLOW0("ui", "ClientRoot::NotifyClientOfNewBounds",
id->local_surface_id().hash(),
TRACE_EVENT_FLAG_FLOW_OUT);
window_tree_->window_tree_client_->OnWindowBoundsChanged(
window_tree_->TransportIdForWindow(window_), last_bounds_,
ProxyWindow::GetMayBeNull(window_)->local_surface_id_allocation());
......
......@@ -21,6 +21,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/threading/thread.h"
#include "base/trace_event/trace_event.h"
#include "cc/base/switches.h"
#include "components/discardable_memory/client/client_discardable_shared_memory_manager.h"
#include "mojo/public/cpp/bindings/map.h"
......@@ -1224,6 +1225,14 @@ void WindowTreeClient::OnWindowBoundsChanged(
if (!window)
return;
if (IsRoot(window)) {
TRACE_EVENT_WITH_FLOW0(
"ui", "ClientRoot::NotifyClientOfNewBounds",
local_surface_id_allocation->local_surface_id().hash(),
TRACE_EVENT_FLAG_FLOW_IN);
}
TRACE_EVENT0("ui", "WindowTreeClient::OnWindowBoundsChanged");
InFlightBoundsChange new_change(this, window, new_bounds,
/* from_server */ true,
local_surface_id_allocation);
......
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