Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion shell/platform/fuchsia/flutter/flatland_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ FlatlandConnection::FlatlandConnection(
FML_LOG(ERROR) << "Flatland disconnected: " << zx_status_get_string(status);
callback();
});
debug_label_ = debug_label;
flatland_->SetDebugName(debug_label);
flatland_.events().OnError =
fit::bind_member(this, &FlatlandConnection::OnError);
Expand All @@ -58,7 +59,10 @@ void FlatlandConnection::Present() {
// This method is called from the raster thread.
void FlatlandConnection::DoPresent() {
TRACE_DURATION("flutter", "FlatlandConnection::DoPresent");
TRACE_FLOW_BEGIN("gfx", "Flatland::Present", next_present_trace_id_);

std::string per_app_tracing_name =
"Flatland::PerAppPresent[" + debug_label_ + "]";
TRACE_FLOW_BEGIN("gfx", per_app_tracing_name.c_str(), next_present_trace_id_);
++next_present_trace_id_;

FML_CHECK(threadsafe_state_.present_credits_ > 0);
Expand Down
1 change: 1 addition & 0 deletions shell/platform/fuchsia/flutter/flatland_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class FlatlandConnection final {
std::vector<zx::event> acquire_fences_;
std::vector<zx::event> current_present_release_fences_;
std::vector<zx::event> previous_present_release_fences_;
std::string debug_label_;

FML_DISALLOW_COPY_AND_ASSIGN(FlatlandConnection);
};
Expand Down