Flutter Engine
The Flutter Engine
|
#import <FlutterSurfaceManager.h>
Instance Methods | |
(nullable instancetype) | - initWithDevice:commandQueue:layer:delegate: |
(nonnull FlutterSurface *) | - surfaceForSize: |
(void) | - presentSurfaces:atTime:notify: |
(instancetype) | - initWithDevice:commandQueue:layer:delegate: [implementation] |
(FlutterBackBufferCache *) | - backBufferCache [implementation] |
(NSArray *) | - frontSurfaces [implementation] |
(NSArray *) | - layers [implementation] |
(BOOL) | - enableSurfaceDebugInfo [implementation] |
(void) | - commit: [implementation] |
(void) | - presentSurfaces:atTime:notify: [implementation] |
Class Methods | |
(static CGSize) | + GetRequiredFrameSize [implementation] |
Protected Attributes | |
id< MTLDevice > | _device |
id< MTLCommandQueue > | _commandQueue |
CALayer * | _containingLayer |
__weak id< FlutterSurfaceManagerDelegate > | _delegate |
FlutterBackBufferCache * | _backBufferCache |
NSMutableArray< FlutterSurface * > * | _frontSurfaces |
NSMutableArray< CALayer * > * | _layers |
NSNumber * | _enableSurfaceDebugInfo |
CATextLayer * | _infoLayer |
CFTimeInterval | _lastPresentationTime |
FlutterSurfaceManager is responsible for providing and presenting Core Animation render surfaces and managing sublayers.
Owned by FlutterView
.
Definition at line 44 of file FlutterSurfaceManager.h.
|
implementation |
Provided by category FlutterSurfaceManager(Private).
Definition at line 38 of file FlutterSurfaceManager.mm.
|
implementation |
Updates underlying CALayers with the contents of the surfaces to present.
Definition at line 38 of file FlutterSurfaceManager.mm.
|
implementation |
Definition at line 38 of file FlutterSurfaceManager.mm.
|
implementation |
Provided by category FlutterSurfaceManager(Private).
Definition at line 38 of file FlutterSurfaceManager.mm.
|
implementation |
Definition at line 209 of file FlutterSurfaceManager.mm.
|
implementation |
Definition at line 38 of file FlutterSurfaceManager.mm.
- (nullable instancetype) initWithDevice: | (nonnull id< MTLDevice >) | device | |
commandQueue: | (nonnull id< MTLCommandQueue >) | commandQueue | |
layer: | (nonnull CALayer *) | containingLayer | |
delegate: | (nonnull id< FlutterSurfaceManagerDelegate >) | delegate | |
Initializes and returns a surface manager that renders to a child layer (referred to as the content layer) of the containing layer.
|
implementation |
Provided by category FlutterSurfaceManager(Private).
Definition at line 38 of file FlutterSurfaceManager.mm.
- (void) presentSurfaces: | (nonnull NSArray< FlutterSurfacePresentInfo * > *) | surfaces | |
atTime: | (CFTimeInterval) | presentationTime | |
notify: | (nullable dispatch_block_t) | notify | |
Sets the provided surfaces as contents of FlutterView. Will create, update and remove sublayers as needed.
Must be called on raster thread. This will schedule a commit on the platform thread and block the raster thread until the commit is done. The notify
block will be invoked on the platform thread and can be used to perform additional work, such as mutating platform views. It is guaranteed be called in the same CATransaction.
|
implementation |
Definition at line 209 of file FlutterSurfaceManager.mm.
- (FlutterSurface *) surfaceForSize: | (CGSize) | size |
Returns a back buffer surface of the given size to which Flutter can render content. A cached surface will be returned if available; otherwise a new one will be created.
Must be called on raster thread.
Definition at line 38 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 25 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 19 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 20 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 21 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 18 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 35 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 28 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 36 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 38 of file FlutterSurfaceManager.mm.
|
protected |
Definition at line 31 of file FlutterSurfaceManager.mm.