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 <QuartzCore/CADisplayLink.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"
46 @property(nonatomic, assign) BOOL allowPauseAfterVsync;
48 - (instancetype)initWithTaskRunner:(fml::RefPtr<fml::TaskRunner>)task_runner
49 callback:(flutter::VsyncWaiter::Callback)callback;
60 - (void)setMaxRefreshRate:(
double)refreshRate;
66 class VsyncWaiterIOS final :
public VsyncWaiter,
public VariableRefreshRateReporter {
73 double GetRefreshRate()
const override;
77 void AwaitVSync()
override;
81 double max_refresh_rate_;
88 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_VSYNC_WAITER_IOS_H_