From 368d88aac1bfcf39f0c7a81f37943b2ae8bd5dc2 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Tue, 10 Dec 2019 13:54:15 -0800 Subject: [PATCH] [fuchsia] Do not Execute paint tasks when there is no vsync This should also reduce the number of OnSurfacesPresented calls made. --- shell/platform/fuchsia/flutter/session_connection.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shell/platform/fuchsia/flutter/session_connection.cc b/shell/platform/fuchsia/flutter/session_connection.cc index e74243fedbd62..f79c5579cf73f 100644 --- a/shell/platform/fuchsia/flutter/session_connection.cc +++ b/shell/platform/fuchsia/flutter/session_connection.cc @@ -63,14 +63,14 @@ void SessionConnection::Present( ToggleSignal(vsync_event_handle_, false); } else { PresentSession(); - } - // Execute paint tasks and signal fences. - auto surfaces_to_submit = scene_update_context_.ExecutePaintTasks(frame); + // Execute paint tasks and signal fences. + auto surfaces_to_submit = scene_update_context_.ExecutePaintTasks(frame); - // Tell the surface producer that a present has occurred so it can perform - // book-keeping on buffer caches. - surface_producer_->OnSurfacesPresented(std::move(surfaces_to_submit)); + // Tell the surface producer that a present has occurred so it can perform + // book-keeping on buffer caches. + surface_producer_->OnSurfacesPresented(std::move(surfaces_to_submit)); + } } void SessionConnection::OnSessionSizeChangeHint(float width_change_factor,