| Flutter iOS Embedder |

Class Methods | Properties | List of all members
DisplayLinkManager Class Reference

`#import <vsync_waiter_ios.h>`

Inheritance diagram for DisplayLinkManager:

## Class Methods
(double) | + displayRefreshRate
(double) | + displayRefreshRate
| The display refresh rate used for reporting purposes. The engine does not care about this for frame scheduling. It is only used by tools for instrumentation. The engine uses the duration field of the link per frame for frame scheduling. More...

## Properties
BOOL | maxRefreshRateEnabledOnIPhone

## Detailed Description

Definition at line 12 of file FlutterMetalLayer.mm.

## Method Documentation

## ◆ displayRefreshRate [1/2]

+ (double) displayRefreshRate |  |  |

Definition at line 174 of file vsync_waiter_ios.mm.

174 {
175 fml::scoped_nsobject<CADisplayLink> display_link = fml::scoped_nsobject<CADisplayLink> {
176 [[CADisplayLink displayLinkWithTarget:[[[DisplayLinkManager alloc] init] autorelease]
177 selector:@selector(onDisplayLink:)] retain]
178 };
179 display_link.get().paused = YES;
180 auto preferredFPS = display_link.get().preferredFramesPerSecond;
181
182 // From Docs:
183 // The default value for preferredFramesPerSecond is 0. When this value is 0, the preferred
184 // frame rate is equal to the maximum refresh rate of the display, as indicated by the
185 // maximumFramesPerSecond property.
186
187 if (preferredFPS != 0) {
188 return preferredFPS;
189 }
190
191 return [UIScreen mainScreen].maximumFramesPerSecond;
192 }

Referenced by VSyncClient::initWithTaskRunner:callback:.

## ◆ displayRefreshRate [2/2]

+ (double) displayRefreshRate |  |  |

The display refresh rate used for reporting purposes. The engine does not care about this for frame scheduling. It is only used by tools for instrumentation. The engine uses the duration field of the link per frame for frame scheduling.

Attention
  Do not use the this call in frame scheduling. It is only meant for reporting.

Returns
  The refresh rate in frames per second.

## Property Documentation

## ◆ maxRefreshRateEnabledOnIPhone

- (BOOL) maxRefreshRateEnabledOnIPhone
| read nonatomic assign

Definition at line 13 of file FlutterMetalLayer.mm.

Referenced by VSyncClient::setMaxRefreshRate:.

The documentation for this class was generated from the following files:

- shell/platform/darwin/ios/framework/Source/FlutterMetalLayer.mm
- shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.h
- shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm

DisplayLinkManager
Definition: FlutterMetalLayer.mm:12