| 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"
9 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h"
10
11 namespace flutter {
12
13 class IOSExternalViewEmbedder : public ExternalViewEmbedder {
14 public:
15 IOSExternalViewEmbedder(
16 __weak FlutterPlatformViewsController* platform_views_controller,
17 const std::shared_ptr<IOSContext>& context);
18
19 // |ExternalViewEmbedder|
20 virtual ~IOSExternalViewEmbedder() override;
21
22 private:
23 __weak FlutterPlatformViewsController* platform_views_controller_;
24 std::shared_ptr<IOSContext> ios_context_;
25
26 // |ExternalViewEmbedder|
27 DlCanvas* GetRootCanvas() override;
28
29 // |ExternalViewEmbedder|
30 void CancelFrame() override;
31
32 // |ExternalViewEmbedder|
33 void BeginFrame(GrDirectContext* context,
34 const fml::RefPtr<fml::RasterThreadMerger>&
35 raster_thread_merger) override;
36
37 // |ExternalViewEmbedder|
38 void PrepareFlutterView(DlISize frame_size,
39 double device_pixel_ratio) override;
40
41 // |ExternalViewEmbedder|
42 void PrerollCompositeEmbeddedView(
43 int64_t view_id,
44 std::unique_ptr<flutter::EmbeddedViewParams> params) override;
45
46 // |ExternalViewEmbedder|
47 PostPrerollResult PostPrerollAction(
48 const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger)
49 override;
50
51 // |ExternalViewEmbedder|
52 DlCanvas* CompositeEmbeddedView(int64_t view_id) override;
53
54 // |ExternalViewEmbedder|
55 void SubmitFlutterView(
56 int64_t flutter_view_id,
57 GrDirectContext* context,
58 const std::shared_ptr<impeller::AiksContext>& aiks_context,
59 std::unique_ptr<SurfaceFrame> frame) override;
60
61 // |ExternalViewEmbedder|
62 void EndFrame(bool should_resubmit_frame,
63 const fml::RefPtr<fml::RasterThreadMerger>&
64 raster_thread_merger) override;
65
66 // |ExternalViewEmbedder|
67 bool SupportsDynamicThreadMerging() override;
68
69 // |ExternalViewEmbedder|
70 void PushFilterToVisitedPlatformViews(
71 const std::shared_ptr<DlImageFilter>& filter,
72 const DlRect& filter_rect) override;
73
74 // |ExternalViewEmbedder|
75 void PushClipRectToVisitedPlatformViews(const DlRect& clip_rect) override;
76
77 // |ExternalViewEmbedder|
78 void PushClipRRectToVisitedPlatformViews(
79 const DlRoundRect& clip_rrect) override;
80
81 // |ExternalViewEmbedder|
82 void PushClipRSuperellipseToVisitedPlatformViews(
83 const DlRoundSuperellipse& clip_rse) override;
84
85 // |ExternalViewEmbedder|
86 void PushClipPathToVisitedPlatformViews(const DlPath& clip_path) override;
87
88 // |ExternalViewEmbedder|
89 void PushVisitedPlatformView(int64_t view_id) override;
90
91 FML_DISALLOW_COPY_AND_ASSIGN(IOSExternalViewEmbedder);
92 };
93
94 } // namespace flutter
95
96 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_EXTERNAL_VIEW_EMBEDDER_H_
FlutterPlatformViews_Internal.h
flutter::IOSExternalViewEmbedder
Definition: ios_external_view_embedder.h:13
flutter::IOSExternalViewEmbedder::IOSExternalViewEmbedder
IOSExternalViewEmbedder(__weak FlutterPlatformViewsController *platform_views_controller, const std::shared_ptr< IOSContext > &context)
Definition: ios_external_view_embedder.mm:14
flutter::IOSExternalViewEmbedder::~IOSExternalViewEmbedder
virtual ~IOSExternalViewEmbedder() override
FlutterPlatformViewsController
Definition: FlutterPlatformViewsController.h:31
flutter
Definition: accessibility_bridge.h:26