Definition at line 29 of file FlutterDisplayLink.mm.
◆ didFireWithTimestamp:targetTimestamp:
- (void) didFireWithTimestamp: |
|
(CFTimeInterval) |
timestamp |
targetTimestamp: |
|
(CFTimeInterval) |
targetTimestamp |
|
|
| |
Definition at line 69 of file FlutterDisplayLink.mm.
309 :(CFTimeInterval)timestamp
310 targetTimestamp:(CFTimeInterval)targetTimestamp {
311 @synchronized(self) {
313 id<FlutterDisplayLinkDelegate>
delegate = _delegate;
314 [delegate onDisplayLink:timestamp targetTimestamp:targetTimestamp];
315 }
316 }
317}
id< FlutterDisplayLinkDelegate > delegate
◆ initWithView:
- (instancetype) initWithView: |
|
(NSView*) |
view |
|
|
implementation |
Definition at line 69 of file FlutterDisplayLink.mm.
243 :(NSView*)view {
245 if (
self = [super
init]) {
247 [view addSubview:self->_view];
249 [[NSNotificationCenter defaultCenter] addObserver:self
250 selector:@selector(viewDidChangeWindow:)
251 name:kFlutterDisplayLinkViewDidMoveToWindow
252 object:self->_view];
253 [[NSNotificationCenter defaultCenter] addObserver:self
254 selector:@selector(windowDidChangeScreen:)
255 name:NSWindowDidChangeScreenNotification
256 object:nil];
257 [self updateScreen];
258 }
259 return self;
260}
#define FML_DCHECK(condition)
◆ invalidate
Invalidates the display link. Must be called on the main thread.
Reimplemented from FlutterDisplayLink.
Definition at line 69 of file FlutterDisplayLink.mm.
262 {
263 @synchronized(self) {
265
266
267
268 [[NSNotificationCenter defaultCenter] removeObserver:self];
269 [_view removeFromSuperview];
271 _delegate = nil;
272 }
273 DisplayLinkManager::Instance().UnregisterDisplayLink(self);
274}
_FlutterDisplayLinkView * _view
◆ nominalOutputRefreshPeriod
- (CFTimeInterval) nominalOutputRefreshPeriod |
|
|
|
|
implementation |
Definition at line 69 of file FlutterDisplayLink.mm.
335 {
336 CGDirectDisplayID display_id;
337 @synchronized(self) {
340 } else {
341 return 0;
342 }
343 }
344 return DisplayLinkManager::Instance().GetNominalOutputPeriod(display_id);
345}
std::optional< CGDirectDisplayID > _display_id
◆ paused
◆ setPaused:
- (void) setPaused: |
|
(BOOL) |
paused |
|
|
implementation |
Definition at line 69 of file FlutterDisplayLink.mm.
326 @synchronized(self) {
328 return;
329 }
331 }
332 DisplayLinkManager::Instance().PausedDidChange(self);
333}
◆ updateScreen
Definition at line 69 of file FlutterDisplayLink.mm.
276 {
277 DisplayLinkManager::Instance().UnregisterDisplayLink(self);
278 std::optional<CGDirectDisplayID> displayId;
279 @synchronized(self) {
280 NSScreen* screen =
_view.window.screen;
281 if (screen != nil) {
282
284 [[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue];
285 } else {
287 }
289 }
290 if (displayId.has_value()) {
291 DisplayLinkManager::Instance().RegisterDisplayLink(self, *displayId);
292 }
293}
◆ viewDidChangeWindow:
- (void) viewDidChangeWindow: |
|
(NSNotification*) |
notification |
|
|
implementation |
Definition at line 69 of file FlutterDisplayLink.mm.
295 :(NSNotification*)notification {
296 NSView* view = notification.object;
298 [self updateScreen];
299 }
300}
◆ windowDidChangeScreen:
- (void) windowDidChangeScreen: |
|
(NSNotification*) |
notification |
|
|
implementation |
Definition at line 69 of file FlutterDisplayLink.mm.
302 :(NSNotification*)notification {
303 NSWindow*
window = notification.object;
305 [self updateScreen];
306 }
307}
◆ _display_id
- (optional<CGDirectDisplayID>) _FlutterDisplayLink: |
|
protected |
◆ _paused
◆ _view
The documentation for this class was generated from the following file: