| Flutter macOS Embedder |

FlutterVSyncWaiter.h
Go to the documentation of this file.
1 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERVSYNCWAITER_H_
2 #define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERVSYNCWAITER_H_
3
4 #import <AppKit/AppKit.h>
5
6 @class FlutterDisplayLink;
7
8 @interface FlutterVSyncWaiter : NSObject
9
10 /// Creates new waiter instance tied to provided NSView.
11 /// This function must be called on the main thread.
12 ///
13 /// Provided |block| will be invoked on same thread as -waitForVSync:.
14 - (instancetype)initWithDisplayLink:(FlutterDisplayLink*)displayLink
15 block:(void (^)(CFTimeInterval timestamp,
16 CFTimeInterval targetTimestamp,
17 uintptr_t baton))block;
18
19 /// Schedules |baton| to be signaled on next display refresh.
20 /// The block provided in the initializer will be invoked on same thread
21 /// as this method (there must be a run loop associated with current thread).
22 - (void)waitForVSync:(uintptr_t)baton;
23
24 @end
25
26 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERVSYNCWAITER_H_
FlutterVSyncWaiter
Definition: FlutterVSyncWaiter.h:8
FlutterDisplayLink
Definition: FlutterDisplayLink.h:15