Skip to content

Commit b60dcf3

Browse files
authored
Fix VsyncWaiter (flutter#25551)
This PR accomplishes many things: - Unblocks input resampling on Fuchsia - Fixes 2 frame scheduling issues resulting in wasted work and missed frames - Removes the now-defunct VsyncRecorder class - Prepares the VsyncWaiter class for the Embedder API by moving all logic out of it - Adds hundreds of lines of unittests for Fuchsia scheduling logic to validate the performance and correctness benefits
1 parent 3e2dfb7 commit b60dcf3

17 files changed

+868
-693
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,11 +1374,8 @@ FILE: ../../../flutter/shell/platform/fuchsia/flutter/task_runner_adapter.h
13741374
FILE: ../../../flutter/shell/platform/fuchsia/flutter/thread.cc
13751375
FILE: ../../../flutter/shell/platform/fuchsia/flutter/thread.h
13761376
FILE: ../../../flutter/shell/platform/fuchsia/flutter/unique_fdio_ns.h
1377-
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vsync_recorder.cc
1378-
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vsync_recorder.h
13791377
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vsync_waiter.cc
13801378
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vsync_waiter.h
1381-
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vsync_waiter_unittests.cc
13821379
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vulkan_surface.cc
13831380
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vulkan_surface.h
13841381
FILE: ../../../flutter/shell/platform/fuchsia/flutter/vulkan_surface_pool.cc

shell/common/animator.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ void Animator::BeginFrame(
130130
// If we still don't have valid continuation, the pipeline is currently
131131
// full because the consumer is being too slow. Try again at the next
132132
// frame interval.
133+
TRACE_EVENT0("flutter", "PipelineFull");
133134
RequestFrame();
134135
return;
135136
}

shell/platform/fuchsia/flutter/BUILD.gn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ template("runner_sources") {
8383
"thread.cc",
8484
"thread.h",
8585
"unique_fdio_ns.h",
86-
"vsync_recorder.cc",
87-
"vsync_recorder.h",
8886
"vsync_waiter.cc",
8987
"vsync_waiter.h",
9088
"vulkan_surface.cc",
@@ -455,8 +453,6 @@ executable("flutter_runner_unittests") {
455453
"runner_unittest.cc",
456454
"tests/engine_unittests.cc",
457455
"tests/flutter_runner_product_configuration_unittests.cc",
458-
"tests/vsync_recorder_unittests.cc",
459-
"vsync_waiter_unittests.cc",
460456
]
461457

462458
# This is needed for //third_party/googletest for linking zircon symbols.

0 commit comments

Comments
 (0)