7 #include "flutter/common/constants.h"
14 const std::shared_ptr<FlutterPlatformViewsController>& platform_views_controller,
15 std::shared_ptr<IOSContext> context)
16 : platform_views_controller_(platform_views_controller), ios_context_(std::move(context)) {
17 FML_CHECK(ios_context_);
23 DlCanvas* IOSExternalViewEmbedder::GetRootCanvas() {
30 void IOSExternalViewEmbedder::CancelFrame() {
31 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::CancelFrame");
32 FML_CHECK(platform_views_controller_);
33 platform_views_controller_->CancelFrame();
37 void IOSExternalViewEmbedder::BeginFrame(
38 GrDirectContext* context,
39 const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger) {}
42 void IOSExternalViewEmbedder::PrepareFlutterView(SkISize frame_size,
double device_pixel_ratio) {
43 FML_CHECK(platform_views_controller_);
44 platform_views_controller_->BeginFrame(frame_size);
48 void IOSExternalViewEmbedder::PrerollCompositeEmbeddedView(
50 std::unique_ptr<EmbeddedViewParams> params) {
51 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::PrerollCompositeEmbeddedView");
52 FML_CHECK(platform_views_controller_);
53 platform_views_controller_->PrerollCompositeEmbeddedView(view_id, std::move(params));
57 PostPrerollResult IOSExternalViewEmbedder::PostPrerollAction(
58 const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger) {
59 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::PostPrerollAction");
60 FML_CHECK(platform_views_controller_);
61 PostPrerollResult result = platform_views_controller_->PostPrerollAction(raster_thread_merger);
66 DlCanvas* IOSExternalViewEmbedder::CompositeEmbeddedView(int64_t view_id) {
67 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::CompositeEmbeddedView");
68 FML_CHECK(platform_views_controller_);
69 return platform_views_controller_->CompositeEmbeddedView(view_id);
73 void IOSExternalViewEmbedder::SubmitFlutterView(
74 int64_t flutter_view_id,
75 GrDirectContext* context,
76 const std::shared_ptr<impeller::AiksContext>& aiks_context,
77 std::unique_ptr<SurfaceFrame> frame) {
78 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::SubmitFlutterView");
81 FML_DCHECK(flutter_view_id == kFlutterImplicitViewId);
82 FML_CHECK(platform_views_controller_);
83 platform_views_controller_->SubmitFrame(context, ios_context_, std::move(frame));
84 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::DidSubmitFrame");
88 void IOSExternalViewEmbedder::EndFrame(
89 bool should_resubmit_frame,
90 const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger) {
91 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::EndFrame");
92 platform_views_controller_->EndFrame(should_resubmit_frame, raster_thread_merger);
96 bool IOSExternalViewEmbedder::SupportsDynamicThreadMerging() {
101 void IOSExternalViewEmbedder::PushFilterToVisitedPlatformViews(
102 const std::shared_ptr<const DlImageFilter>& filter,
103 const SkRect& filter_rect) {
104 platform_views_controller_->PushFilterToVisitedPlatformViews(filter, filter_rect);
108 void IOSExternalViewEmbedder::PushVisitedPlatformView(int64_t view_id) {
109 platform_views_controller_->PushVisitedPlatformView(view_id);