| 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(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(
35 SkISize frame_size,
36 GrDirectContext* context,
37 double device_pixel_ratio,
38 fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger) override;
39
40 // |ExternalViewEmbedder|
41 void PrerollCompositeEmbeddedView(
42 int64_t view_id,
43 std::unique_ptr<flutter::EmbeddedViewParams> params) override;
44
45 // |ExternalViewEmbedder|
46 PostPrerollResult PostPrerollAction(
47 fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger) override;
48
49 // |ExternalViewEmbedder|
50 DlCanvas* CompositeEmbeddedView(int64_t view_id) override;
51
52 // |ExternalViewEmbedder|
53 void SubmitFrame(GrDirectContext* context,
54 const std::shared_ptr<impeller::AiksContext>& aiks_context,
55 std::unique_ptr<SurfaceFrame> frame) override;
56
57 // |ExternalViewEmbedder|
58 void EndFrame(
59 bool should_resubmit_frame,
60 fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger) override;
61
62 // |ExternalViewEmbedder|
63 bool SupportsDynamicThreadMerging() override;
64
65 // |ExternalViewEmbedder|
66 void PushFilterToVisitedPlatformViews(
67 std::shared_ptr<const DlImageFilter> filter,
68 const SkRect& filter_rect) override;
69
70 // |ExternalViewEmbedder|
71 void PushVisitedPlatformView(int64_t view_id) override;
72
73 FML_DISALLOW_COPY_AND_ASSIGN(IOSExternalViewEmbedder);
74 };
75
76 } // namespace flutter
77
78 #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:9