#import <FlutterVSyncWaiter.h>
Instance Methods | |
(instancetype) | - initWithDisplayLink:block: |
(void) | - waitForVSync: |
Definition at line 8 of file FlutterVSyncWaiter.h.
- (instancetype) initWithDisplayLink: | (FlutterDisplayLink*) | displayLink | |
block: | (void(^)(CFTimeInterval timestamp, CFTimeInterval targetTimestamp, uintptr_t baton)) | block | |
Creates new waiter instance tied to provided NSView. This function must be called on the main thread.
Provided |block| will be invoked on same thread as -waitForVSync:.
Definition at line 45 of file FlutterVSyncWaiter.mm.
References _block, _displayLink, _warmUpFrame, FlutterDisplayLink::delegate, and FlutterDisplayLink::paused.
- (void) waitForVSync: | (uintptr_t) | baton |
Schedules |baton| to be signaled on next display refresh. The block provided in the initializer will be invoked on same thread as this method (there must be a run loop associated with current thread).
Definition at line 108 of file FlutterVSyncWaiter.mm.
References _block, _displayLink, _lastTargetTimestamp, _runLoop, _warmUpFrame, kTimerLatencyCompensation, FlutterDisplayLink::nominalOutputRefreshPeriod, FlutterDisplayLink::paused, and TRACE_VSYNC.
Referenced by TEST().