Skip to content

Commit 10d8384

Browse files
authored
Revert "[fuchsia] change kMaxFramesInFlight to 3 (flutter#16425)"
This reverts commit 6ff3ecc.
1 parent a448674 commit 10d8384

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

shell/platform/fuchsia/flutter/session_connection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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;

shell/platform/fuchsia/flutter/vsync_waiter.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff 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

158149
void VsyncWaiter::FireCallbackWhenSessionAvailable() {

shell/platform/fuchsia/flutter/vsync_waiter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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_;

0 commit comments

Comments
 (0)