5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_VSYNC_WAITER_IOS_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_VSYNC_WAITER_IOS_H_
8 #include <CoreFoundation/CoreFoundation.h>
10 #include "flutter/fml/macros.h"
11 #include "flutter/shell/common/variable_refresh_rate_reporter.h"
12 #include "flutter/shell/common/vsync_waiter.h"
14 @class FlutterVSyncClient;
18 class VsyncWaiterIOS final :
public VsyncWaiter,
public VariableRefreshRateReporter {
36 static CFTimeInterval
SnapDuration(CFTimeInterval duration,
double max_refresh_rate);
41 void AwaitVSync()
override;
44 FlutterVSyncClient* client_;
45 double max_refresh_rate_;
~VsyncWaiterIOS() override
static CFTimeInterval SnapDuration(CFTimeInterval duration, double max_refresh_rate)
double GetRefreshRate() const override
VsyncWaiterIOS(const flutter::TaskRunners &task_runners)