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/fml/memory/weak_ptr.h"
12 #include "flutter/fml/platform/darwin/scoped_nsobject.h"
13 #include "flutter/shell/common/variable_refresh_rate_reporter.h"
14 #include "flutter/shell/common/vsync_waiter.h"
48 @property(nonatomic, assign) BOOL allowPauseAfterVsync;
50 - (instancetype)initWithTaskRunner:(fml::RefPtr<fml::TaskRunner>)task_runner
51 callback:(flutter::VsyncWaiter::Callback)callback;
59 - (double)getRefreshRate;
61 - (void)setMaxRefreshRate:(
double)refreshRate;
67 class VsyncWaiterIOS final :
public VsyncWaiter,
public VariableRefreshRateReporter {
74 double GetRefreshRate()
const override;
77 fml::scoped_nsobject<VSyncClient> GetVsyncClient()
const;
81 void AwaitVSync()
override;
84 fml::scoped_nsobject<VSyncClient> client_;
85 double max_refresh_rate_;
92 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_VSYNC_WAITER_IOS_H_