File tree Expand file tree Collapse file tree 3 files changed +2
-14
lines changed
shell/platform/fuchsia/flutter Expand file tree Collapse file tree 3 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class SessionConnection final {
9494 // The maximum number of frames Flutter sent to Scenic that it can have
9595 // outstanding at any time. This is equivalent to how many times it has
9696 // called Present2() before receiving an OnFramePresented() event.
97- static constexpr int kMaxFramesInFlight = 3 ;
97+ static constexpr int kMaxFramesInFlight = 2 ;
9898 int frames_in_flight_ = 0 ;
9999
100100 int frames_in_flight_allowed_ = 0 ;
Original file line number Diff line number Diff line change @@ -131,15 +131,6 @@ void VsyncWaiter::AwaitVSync() {
131131 VsyncRecorder::GetInstance ().GetLastPresentationTime ();
132132 fml::TimePoint next_vsync = SnapToNextPhase (now, last_presentation_time,
133133 vsync_info.presentation_interval );
134-
135- auto next_vsync_start_time = next_vsync - vsync_offset;
136-
137- if (now >= next_vsync_start_time)
138- next_vsync_start_time =
139- next_vsync_start_time + vsync_info.presentation_interval ;
140-
141- fml::TimeDelta delta = next_vsync_start_time - now;
142-
143134 task_runners_.GetUITaskRunner ()->PostDelayedTask (
144135 [& weak_factory_ui = this ->weak_factory_ui_ ] {
145136 if (!weak_factory_ui) {
@@ -152,7 +143,7 @@ void VsyncWaiter::AwaitVSync() {
152143 self->FireCallbackWhenSessionAvailable ();
153144 }
154145 },
155- delta );
146+ next_vsync - now );
156147}
157148
158149void VsyncWaiter::FireCallbackWhenSessionAvailable () {
Original file line number Diff line number Diff line change @@ -34,9 +34,6 @@ class VsyncWaiter final : public flutter::VsyncWaiter {
3434 async::Wait session_wait_;
3535 fml::WeakPtrFactory<VsyncWaiter> weak_factory_;
3636
37- static constexpr fml::TimeDelta vsync_offset =
38- fml::TimeDelta::FromNanoseconds (0 );
39-
4037 // For accessing the VsyncWaiter via the UI thread, necessary for the callback
4138 // for AwaitVSync()
4239 std::unique_ptr<fml::WeakPtrFactory<VsyncWaiter>> weak_factory_ui_;
You can’t perform that action at this time.
0 commit comments