Flutter iOS Embedder
ios_external_view_embedder.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_EXTERNAL_VIEW_EMBEDDER_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_EXTERNAL_VIEW_EMBEDDER_H_
7 
8 #include "flutter/flow/embedded_views.h"
10 
11 namespace flutter {
12 
13 class IOSExternalViewEmbedder : public ExternalViewEmbedder {
14  public:
15  IOSExternalViewEmbedder(const std::shared_ptr<FlutterPlatformViewsController>&
16  platform_views_controller,
17  std::shared_ptr<IOSContext> context);
18 
19  // |ExternalViewEmbedder|
20  virtual ~IOSExternalViewEmbedder() override;
21 
22  private:
23  const std::shared_ptr<FlutterPlatformViewsController>&
24  platform_views_controller_;
25  std::shared_ptr<IOSContext> ios_context_;
26 
27  // |ExternalViewEmbedder|
28  DlCanvas* GetRootCanvas() override;
29 
30  // |ExternalViewEmbedder|
31  void CancelFrame() override;
32 
33  // |ExternalViewEmbedder|
34  void BeginFrame(GrDirectContext* context,
35  const fml::RefPtr<fml::RasterThreadMerger>&
36  raster_thread_merger) override;
37 
38  // |ExternalViewEmbedder|
39  void PrepareFlutterView(SkISize frame_size,
40  double device_pixel_ratio) override;
41 
42  // |ExternalViewEmbedder|
43  void PrerollCompositeEmbeddedView(
44  int64_t view_id,
45  std::unique_ptr<flutter::EmbeddedViewParams> params) override;
46 
47  // |ExternalViewEmbedder|
48  PostPrerollResult PostPrerollAction(
49  const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger)
50  override;
51 
52  // |ExternalViewEmbedder|
53  DlCanvas* CompositeEmbeddedView(int64_t view_id) override;
54 
55  // |ExternalViewEmbedder|
56  void SubmitFlutterView(
57  int64_t flutter_view_id,
58  GrDirectContext* context,
59  const std::shared_ptr<impeller::AiksContext>& aiks_context,
60  std::unique_ptr<SurfaceFrame> frame) override;
61 
62  // |ExternalViewEmbedder|
63  void EndFrame(bool should_resubmit_frame,
64  const fml::RefPtr<fml::RasterThreadMerger>&
65  raster_thread_merger) override;
66 
67  // |ExternalViewEmbedder|
68  bool SupportsDynamicThreadMerging() override;
69 
70  // |ExternalViewEmbedder|
71  void PushFilterToVisitedPlatformViews(
72  const std::shared_ptr<const DlImageFilter>& filter,
73  const SkRect& filter_rect) override;
74 
75  // |ExternalViewEmbedder|
76  void PushVisitedPlatformView(int64_t view_id) override;
77 
78  FML_DISALLOW_COPY_AND_ASSIGN(IOSExternalViewEmbedder);
79 };
80 
81 } // namespace flutter
82 
83 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_EXTERNAL_VIEW_EMBEDDER_H_
flutter::IOSExternalViewEmbedder::~IOSExternalViewEmbedder
virtual ~IOSExternalViewEmbedder() override
flutter
Definition: accessibility_bridge.h:28
FlutterPlatformViews_Internal.h
flutter::IOSExternalViewEmbedder
Definition: ios_external_view_embedder.h:13
flutter::IOSExternalViewEmbedder::IOSExternalViewEmbedder
IOSExternalViewEmbedder(const std::shared_ptr< FlutterPlatformViewsController > &platform_views_controller, std::shared_ptr< IOSContext > context)
Definition: ios_external_view_embedder.mm:13