213 void SetFlutterView(UIView* flutter_view);
215 void SetFlutterViewController(UIViewController<FlutterViewResponder>* flutter_view_controller);
217 UIViewController<FlutterViewResponder>* getFlutterViewController();
219 void RegisterViewFactory(
220 NSObject<FlutterPlatformViewFactory>* factory,
225 void BeginFrame(
SkISize frame_size);
231 void PrerollCompositeEmbeddedView(int64_t view_id,
232 std::unique_ptr<flutter::EmbeddedViewParams>
params);
234 size_t EmbeddedViewCount();
241 UIView* GetPlatformViewByID(int64_t view_id);
253 void EndFrame(
bool should_resubmit_frame,
256 DlCanvas* CompositeEmbeddedView(int64_t view_id);
260 SkRect GetPlatformViewRect(int64_t view_id);
266 const std::shared_ptr<IOSContext>& ios_context,
267 std::unique_ptr<SurfaceFrame>
frame);
273 long FindFirstResponderPlatformViewId();
276 void PushFilterToVisitedPlatformViews(
const std::shared_ptr<const DlImageFilter>& filter,
277 const SkRect& filter_rect);
283 static const size_t kMaxLayerAllocations = 2;
285 using LayersMap = std::map<int64_t, std::vector<std::shared_ptr<FlutterPlatformViewLayer>>>;
299 bool HasPlatformViewThisOrNextFrame();
304 void ClipViewSetMaskView(UIView* clipView);
316 UIView* embedded_view,
317 const SkRect& bounding_rect);
323 std::shared_ptr<FlutterPlatformViewLayer> GetLayer(
GrDirectContext* gr_context,
324 const std::shared_ptr<IOSContext>& ios_context,
329 MTLPixelFormat pixel_format);
332 void RemoveUnusedLayers();
335 void BringLayersIntoView(LayersMap layer_map);
339 void BeginCATransaction();
342 void CommitCATransactionIfNeeded();
345 void ResetFrameState();
348 std::unique_ptr<FlutterPlatformViewLayerPool> layer_pool_;
354 std::map<int64_t, std::unique_ptr<EmbedderViewSlice>> slices_;
360 std::map<std::string, fml::scoped_nsobject<NSObject<FlutterPlatformViewFactory>>> factories_;
361 std::map<int64_t, fml::scoped_nsobject<NSObject<FlutterPlatformView>>> views_;
362 std::map<int64_t, fml::scoped_nsobject<FlutterTouchInterceptingView>> touch_interceptors_;
368 std::map<int64_t, fml::scoped_nsobject<UIView>> root_views_;
370 std::map<int64_t, EmbeddedViewParams> current_composition_params_;
373 std::map<int64_t, int64_t> clip_count_;
381 static const int kDefaultMergedLeaseDuration = 10;
385 std::unordered_set<int64_t> views_to_dispose_;
389 std::vector<int64_t> composition_order_;
392 std::vector<int64_t> visited_platform_views_;
395 std::vector<int64_t> active_composition_order_;
398 std::unordered_set<int64_t> views_to_recomposite_;
401 std::map<std::string, FlutterPlatformViewGestureRecognizersBlockingPolicy>
402 gesture_recognizers_blocking_policies_;
404 bool catransaction_added_ =
false;
407 std::unique_ptr<fml::WeakPtrFactory<FlutterPlatformViewsController>> weak_factory_;
409#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
413 std::unordered_set<int64_t> non_zero_origin_views_;