Flutter iOS Embedder
FlutterPlatformViewsController() Category Reference

Instance Methods

(void) - createMissingOverlays:withIosContext:grContext:
 
(void) - performSubmit:currentCompositionParams:viewsToRecomposite:compositionOrder:unusedLayers:surfaceFrames:
 Update the buffers and mutate the platform views in CATransaction on the platform thread. More...
 
(void) - onCreate:result:
 
(void) - onDispose:result:
 
(void) - onAcceptGesture:result:
 
(void) - onRejectGesture:result:
 
(void) - clipViewSetMaskView:
 
(void) - applyMutators:embeddedView:boundingRect:
 
(void) - bringLayersIntoView:withCompositionOrder:
 
(std::shared_ptr< flutter::OverlayLayer >) - nextLayerInPool
 
(void) - createLayerWithIosContext:grContext:pixelFormat:
 Runs on the platform thread. More...
 
(void) - removeUnusedLayers:withCompositionOrder:
 
(std::vector< UIView * >) - computeViewsToDispose
 
(void) - resetFrameState
 Resets the state of the frame. More...
 

Properties

flutter::OverlayLayerPoollayerPool
 
std::unordered_map< int64_t, std::unique_ptr< flutter::EmbedderViewSlice > > & slices
 
FlutterClippingMaskViewPoolmaskViewPool
 
std::unordered_map< std::string, NSObject< FlutterPlatformViewFactory > * > & factories
 
std::unordered_map< std::string, FlutterPlatformViewGestureRecognizersBlockingPolicy > & gestureRecognizersBlockingPolicies
 
SkISize frameSize
 The size of the current onscreen surface in physical pixels. More...
 
const fml::RefPtr< fml::TaskRunner > & platformTaskRunner
 The task runner for posting tasks to the platform thread. More...
 
std::unordered_map< int64_t, PlatformViewData > & platformViews
 This data must only be accessed on the platform thread. More...
 
std::unordered_map< int64_t, flutter::EmbeddedViewParams > & currentCompositionParams
 
std::unordered_set< int64_t > & viewsToDispose
 
std::vector< int64_t > & compositionOrder
 
std::vector< int64_t > & visitedPlatformViews
 
std::unordered_set< int64_t > & viewsToRecomposite
 
std::vector< int64_t > & previousCompositionOrder
 The composition order from the previous thread. More...
 
BOOL hadPlatformViews
 
BOOL canApplyBlurBackdrop
 

Detailed Description

Definition at line 123 of file FlutterPlatformViewsController.mm.

Method Documentation

◆ applyMutators:embeddedView:boundingRect:

- (void) applyMutators: (const flutter::MutatorsStack &)  mutatorsStack
embeddedView: (UIView *)  embeddedView
boundingRect: (const SkRect &)  boundingRect 

◆ bringLayersIntoView:withCompositionOrder:

- (void) bringLayersIntoView: (const LayersMap &)  layerMap
withCompositionOrder: (const std::vector< int64_t > &)  compositionOrder 

◆ clipViewSetMaskView:

- (void) clipViewSetMaskView: (UIView *)  clipView

◆ computeViewsToDispose

- (vector<UIView*> FlutterPlatformViewsController()):

Computes and returns all views to be disposed on the platform thread, removes them from self.platformViews, self.viewsToRecomposite, and self.currentCompositionParams. Any views that still require compositing are not returned, but instead added to viewsToDelayDispose for disposal on the next call.

◆ createLayerWithIosContext:grContext:pixelFormat:

- (void) createLayerWithIosContext: (const std::shared_ptr< flutter::IOSContext > &)  iosContext
grContext: (GrDirectContext *)  grContext
pixelFormat: (MTLPixelFormat)  pixelFormat 

Runs on the platform thread.

◆ createMissingOverlays:withIosContext:grContext:

- (void) createMissingOverlays: (size_t)  requiredOverlayLayers
withIosContext: (const std::shared_ptr< flutter::IOSContext > &)  iosContext
grContext: (GrDirectContext *)  grContext 

Populate any missing overlay layers.

This requires posting a task to the platform thread and blocking on its completion.

◆ nextLayerInPool

- (shared_ptr<)flutter:

◆ onAcceptGesture:result:

- (void) onAcceptGesture: (FlutterMethodCall *)  call
result: (FlutterResult result 

◆ onCreate:result:

- (void) onCreate: (FlutterMethodCall *)  call
result: (FlutterResult result 

◆ onDispose:result:

- (void) onDispose: (FlutterMethodCall *)  call
result: (FlutterResult result 

◆ onRejectGesture:result:

- (void) onRejectGesture: (FlutterMethodCall *)  call
result: (FlutterResult result 

◆ performSubmit:currentCompositionParams:viewsToRecomposite:compositionOrder:unusedLayers:surfaceFrames:

- (void) performSubmit: (const LayersMap &)  platformViewLayers
currentCompositionParams: (std::unordered_map< int64_t, flutter::EmbeddedViewParams > &)  currentCompositionParams
viewsToRecomposite: (const std::unordered_set< int64_t > &)  viewsToRecomposite
compositionOrder: (const std::vector< int64_t > &)  compositionOrder
unusedLayers: (const std::vector< std::shared_ptr< flutter::OverlayLayer >> &)  unusedLayers
surfaceFrames: (const std::vector< std::unique_ptr< flutter::SurfaceFrame >> &)  surfaceFrames 

Update the buffers and mutate the platform views in CATransaction on the platform thread.

◆ removeUnusedLayers:withCompositionOrder:

- (void) removeUnusedLayers: (const std::vector< std::shared_ptr< flutter::OverlayLayer >> &)  unusedLayers
withCompositionOrder: (const std::vector< int64_t > &)  compositionOrder 

Removes overlay views and platform views that aren't needed in the current frame. Must run on the platform thread.

◆ resetFrameState

- (void) resetFrameState

Resets the state of the frame.

Property Documentation

◆ canApplyBlurBackdrop

- (BOOL) canApplyBlurBackdrop
readwritenonatomicassign

Whether blurred backdrop filters can be applied.

Defaults to YES, but becomes NO if blurred backdrop filters cannot be applied.

Definition at line 198 of file FlutterPlatformViewsController.mm.

◆ compositionOrder

- (vector<int64_t>& FlutterPlatformViewsController()):
readnonatomicassign

view IDs in composition order.

This state is only modified on the raster thread.

Definition at line 169 of file FlutterPlatformViewsController.mm.

◆ currentCompositionParams

- (unordered_map<int64_t,) flutter:
readnonatomicassign

The composition parameters for each platform view.

This state is only modified on the raster thread.

Definition at line 158 of file FlutterPlatformViewsController.mm.

◆ factories

- (unordered_map<)std:
readnonatomicassign

Definition at line 138 of file FlutterPlatformViewsController.mm.

◆ frameSize

- (SkISize) frameSize
readwritenonatomicassign

The size of the current onscreen surface in physical pixels.

Definition at line 146 of file FlutterPlatformViewsController.mm.

◆ gestureRecognizersBlockingPolicies

- (unordered_map<)std:
readnonatomicassign

Definition at line 143 of file FlutterPlatformViewsController.mm.

◆ hadPlatformViews

- (BOOL) hadPlatformViews
readwritenonatomicassign

Whether the previous frame had any platform views in active composition order.

This state is tracked so that the first frame after removing the last platform view runs through the platform view rendering code path, giving us a chance to remove the platform view from the UIView hierarchy.

Only accessed from the raster thread.

Definition at line 193 of file FlutterPlatformViewsController.mm.

◆ layerPool

- (OverlayLayerPool* FlutterPlatformViewsController()):
readnonatomicassign

Definition at line 126 of file FlutterPlatformViewsController.mm.

◆ maskViewPool

- (FlutterClippingMaskViewPool*) maskViewPool
readnonatomicassign

Definition at line 135 of file FlutterPlatformViewsController.mm.

◆ platformTaskRunner

- (const RefPtr<)fml:
readnonatomicassign

The task runner for posting tasks to the platform thread.

Definition at line 149 of file FlutterPlatformViewsController.mm.

◆ platformViews

- (unordered_map<int64_t, PlatformViewData>& FlutterPlatformViewsController()):
readnonatomicassign

This data must only be accessed on the platform thread.

Definition at line 152 of file FlutterPlatformViewsController.mm.

◆ previousCompositionOrder

- (vector<int64_t>& FlutterPlatformViewsController()):
readnonatomicassign

The composition order from the previous thread.

Only accessed from the platform thread.

Definition at line 184 of file FlutterPlatformViewsController.mm.

◆ slices

- (unordered_map<int64_t,) std:
readnonatomicassign

Definition at line 133 of file FlutterPlatformViewsController.mm.

◆ viewsToDispose

- (unordered_set<int64_t>& FlutterPlatformViewsController()):
readnonatomicassign

Method channel OnDispose calls adds the views to be disposed to this set to be disposed on the next frame.

This state is modified on both the platform and raster thread.

Definition at line 164 of file FlutterPlatformViewsController.mm.

◆ viewsToRecomposite

- (unordered_set<int64_t>& FlutterPlatformViewsController()):
readnonatomicassign

Only composite platform views in this set.

This state is only modified on the raster thread.

Definition at line 179 of file FlutterPlatformViewsController.mm.

◆ visitedPlatformViews

- (vector<int64_t>& FlutterPlatformViewsController()):
readnonatomicassign

platform view IDs visited during layer tree composition.

This state is only modified on the raster thread.

Definition at line 174 of file FlutterPlatformViewsController.mm.


The documentation for this category was generated from the following file: