5#import "flutter/shell/platform/darwin/ios/ios_external_view_embedder.h"
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)) {
23DlCanvas* IOSExternalViewEmbedder::GetRootCanvas() {
30void IOSExternalViewEmbedder::CancelFrame() {
31 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::CancelFrame");
33 platform_views_controller_->CancelFrame();
37void IOSExternalViewEmbedder::BeginFrame(
42void IOSExternalViewEmbedder::PrepareFlutterView(
SkISize frame_size,
double device_pixel_ratio) {
44 platform_views_controller_->BeginFrame(frame_size);
48void IOSExternalViewEmbedder::PrerollCompositeEmbeddedView(
50 std::unique_ptr<EmbeddedViewParams>
params) {
51 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::PrerollCompositeEmbeddedView");
53 platform_views_controller_->PrerollCompositeEmbeddedView(view_id, std::move(
params));
59 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::PostPrerollAction");
66DlCanvas* IOSExternalViewEmbedder::CompositeEmbeddedView(int64_t view_id) {
67 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::CompositeEmbeddedView");
69 return platform_views_controller_->CompositeEmbeddedView(view_id);
73void IOSExternalViewEmbedder::SubmitFlutterView(
74 int64_t flutter_view_id,
76 const std::shared_ptr<impeller::AiksContext>& aiks_context,
77 std::unique_ptr<SurfaceFrame>
frame) {
78 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::SubmitFlutterView");
83 platform_views_controller_->SubmitFrame(context, ios_context_, std::move(
frame));
84 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::DidSubmitFrame");
88void IOSExternalViewEmbedder::EndFrame(
89 bool should_resubmit_frame,
91 TRACE_EVENT0(
"flutter",
"IOSExternalViewEmbedder::EndFrame");
92 platform_views_controller_->EndFrame(should_resubmit_frame, raster_thread_merger);
96bool IOSExternalViewEmbedder::SupportsDynamicThreadMerging() {
101void IOSExternalViewEmbedder::PushFilterToVisitedPlatformViews(
102 const std::shared_ptr<const DlImageFilter>& filter,
103 const SkRect& filter_rect) {
104 platform_views_controller_->PushFilterToVisitedPlatformViews(filter, filter_rect);
108void IOSExternalViewEmbedder::PushVisitedPlatformView(int64_t view_id) {
109 platform_views_controller_->PushVisitedPlatformView(view_id);
Developer-facing API for rendering anything within the engine.
IOSExternalViewEmbedder(const std::shared_ptr< FlutterPlatformViewsController > &platform_views_controller, std::shared_ptr< IOSContext > context)
virtual ~IOSExternalViewEmbedder() override
const EmbeddedViewParams * params
#define FML_CHECK(condition)
#define FML_DCHECK(condition)
constexpr int64_t kFlutterImplicitViewId
flutter::DlCanvas DlCanvas
#define TRACE_EVENT0(category_group, name)