Commit 1ff532f5 authored by Lorne Mitchell's avatar Lorne Mitchell Committed by Commit Bot

Added compositing_reason_ids to the Layer trace data

The DevTools Performance Timeline tool with 'Advanced paint instrumentation' enabled captures layer trace events, which includes compositing reasons. This change adds compositing_reason_ids to the trace information, so that we can localize the compositing reasons in the client (i.e. DevTools frontend).

Bug: 946860
Change-Id: Ibb9b655c739947898b857489d5f8d727a40ef19b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031528Reviewed-by: default avatarMandy Chen <mandy.chen@microsoft.com>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#736995}
parent 647f8ae0
...@@ -781,6 +781,13 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const { ...@@ -781,6 +781,13 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
state->EndArray(); state->EndArray();
} }
if (debug_info_->compositing_reason_ids.size()) {
state->BeginArray("compositing_reason_ids");
for (const char* reason_id : debug_info_->compositing_reason_ids)
state->AppendString(reason_id);
state->EndArray();
}
if (debug_info_->invalidations.size()) { if (debug_info_->invalidations.size()) {
state->BeginArray("annotated_invalidation_rects"); state->BeginArray("annotated_invalidation_rects");
for (auto& invalidation : debug_info_->invalidations) { for (auto& invalidation : debug_info_->invalidations) {
......
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