Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
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
7 changes: 4 additions & 3 deletions shell/platform/fuchsia/flutter/session_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,15 @@ void SessionConnection::Present(
flutter::CompositorContext::ScopedFrame* frame) {
TRACE_EVENT0("gfx", "SessionConnection::Present");

TRACE_FLOW_BEGIN("gfx", "SessionConnection::PresentSession",
next_present_session_trace_id_);
next_present_session_trace_id_++;

// Throttle frame submission to Scenic if we already have the maximum amount
// of frames in flight. This allows the paint tasks for this frame to execute
// in parallel with the presentation of previous frame but still provides
// back-pressure to prevent us from enqueuing even more work.
if (initialized_ && frames_in_flight_ < kMaxFramesInFlight) {
TRACE_FLOW_BEGIN("gfx", "SessionConnection::PresentSession",
next_present_session_trace_id_);
next_present_session_trace_id_++;
PresentSession();
} else {
// We should never exceed the max frames in flight.
Expand Down