Skip to content

Commit

Permalink
[fuchsia] add frames_in_flight info to trace events (flutter#21302)
Browse files Browse the repository at this point in the history
No tests needed, since there is no change in functionality expected.
  • Loading branch information
farchond committed Sep 22, 2020
1 parent 6e42b54 commit b160f97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shell/platform/fuchsia/flutter/session_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ SessionConnection::SessionConnection(
// A frame was presented: Update our |frames_in_flight| to match the
// updated unfinalized present requests.
frames_in_flight_ -= num_presents_handled;
TRACE_EVENT2("gfx", "OnFramePresentedFelipe", "frames_in_flight",
frames_in_flight_, "max_frames_in_flight",
kMaxFramesInFlight);
FML_DCHECK(frames_in_flight_ >= 0);

VsyncRecorder::GetInstance().UpdateFramePresentedInfo(
Expand Down Expand Up @@ -78,7 +81,8 @@ SessionConnection::SessionConnection(
SessionConnection::~SessionConnection() = default;

void SessionConnection::Present() {
TRACE_EVENT0("gfx", "SessionConnection::Present");
TRACE_EVENT2("gfx", "SessionConnection::Present", "frames_in_flight",
frames_in_flight_, "max_frames_in_flight", kMaxFramesInFlight);

TRACE_FLOW_BEGIN("gfx", "SessionConnection::PresentSession",
next_present_session_trace_id_);
Expand Down

0 comments on commit b160f97

Please sign in to comment.