| 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 const std::shared_ptr<PlatformViewsController>& platform_views_controller,
17 const std::shared_ptr<IOSContext>& context);
18
19 // |ExternalViewEmbedder|
20 virtual ~IOSExternalViewEmbedder() override;
21
22 private:
23 const std::shared_ptr<PlatformViewsController>& 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(SkISize 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<const DlImageFilter>& filter,
72 const SkRect& filter_rect) override;
73
74 // |ExternalViewEmbedder|
75 void PushVisitedPlatformView(int64_t view_id) override;
76
77 FML_DISALLOW_COPY_AND_ASSIGN(IOSExternalViewEmbedder);
78 };
79
80 } // namespace flutter
81
82 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_EXTERNAL_VIEW_EMBEDDER_H_
flutter::IOSExternalViewEmbedder::~IOSExternalViewEmbedder
virtual ~IOSExternalViewEmbedder() override
flutter
Definition: accessibility_bridge.h:28
flutter::IOSExternalViewEmbedder::IOSExternalViewEmbedder
IOSExternalViewEmbedder(const std::shared_ptr< PlatformViewsController > &platform_views_controller, const std::shared_ptr< IOSContext > &context)
Definition: ios_external_view_embedder.mm:14
FlutterPlatformViews_Internal.h
flutter::IOSExternalViewEmbedder
Definition: ios_external_view_embedder.h:13