5#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_PLATFORM_VIEW_ANDROID_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_PLATFORM_VIEW_ANDROID_H_
10#include <unordered_map>
13#include <android/hardware_buffer_jni.h>
14#include "flutter/fml/memory/weak_ptr.h"
15#include "flutter/fml/platform/android/scoped_java_ref.h"
16#include "flutter/lib/ui/window/platform_message.h"
17#include "flutter/shell/common/platform_view.h"
18#include "flutter/shell/common/snapshot_surface_producer.h"
19#include "flutter/shell/platform/android/context/android_context.h"
20#include "flutter/shell/platform/android/jni/platform_view_android_jni.h"
21#include "flutter/shell/platform/android/platform_message_handler_android.h"
22#include "flutter/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate.h"
23#include "flutter/shell/platform/android/surface/android_native_window.h"
24#include "flutter/shell/platform/android/surface/android_surface.h"
31 bool enable_impeller);
38 const std::shared_ptr<AndroidContext>& android_context_;
39 const bool enable_impeller_;
48 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade,
49 bool use_software_rendering);
59 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade,
60 const std::shared_ptr<flutter::AndroidContext>& android_context);
77 jint message_position,
100 intptr_t loading_unit_id,
101 std::unique_ptr<const fml::Mapping> snapshot_data,
102 std::unique_ptr<const fml::Mapping> snapshot_instructions)
override;
105 const std::string error_message,
106 bool transient)
override;
110 std::unique_ptr<AssetResolver> updated_asset_resolver,
114 return android_context_;
119 return platform_message_handler_;
123 const std::shared_ptr<PlatformViewAndroidJNI> jni_facade_;
124 std::shared_ptr<AndroidContext> android_context_;
125 std::shared_ptr<AndroidSurfaceFactoryImpl> surface_factory_;
129 std::unique_ptr<AndroidSurface> android_surface_;
130 std::shared_ptr<PlatformMessageHandlerAndroid> platform_message_handler_;
133 void UpdateSemantics(
138 void HandlePlatformMessage(
139 std::unique_ptr<flutter::PlatformMessage>
message)
override;
142 void OnPreEngineRestart()
const override;
145 std::unique_ptr<VsyncWaiter> CreateVSyncWaiter()
override;
148 std::unique_ptr<Surface> CreateRenderingSurface()
override;
151 std::shared_ptr<ExternalViewEmbedder> CreateExternalViewEmbedder()
override;
154 std::unique_ptr<SnapshotSurfaceProducer> CreateSnapshotSurfaceProducer()
161 void ReleaseResourceContext()
const override;
164 std::shared_ptr<impeller::Context> GetImpellerContext()
const override;
167 std::unique_ptr<std::vector<std::string>> ComputePlatformResolvedLocales(
168 const std::vector<std::string>& supported_locale_data)
override;
171 void RequestDartDeferredLibrary(intptr_t loading_unit_id)
override;
173 void InstallFirstFrameCallback();
175 void FireFirstFrameCallback();
177 double GetScaledFontSize(
double unscaled_font_size,
178 int configuration_id)
const override;
std::unique_ptr< AndroidSurface > CreateSurface() override
AndroidSurfaceFactoryImpl(const std::shared_ptr< AndroidContext > &context, bool enable_impeller)
~AndroidSurfaceFactoryImpl() override
AssetResolverType
Identifies the type of AssetResolver an instance is.
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
std::unordered_map< int32_t, SemanticsNode > SemanticsNodeUpdates
std::unordered_map< int32_t, CustomAccessibilityAction > CustomAccessibilityActionUpdates
DEF_SWITCHES_START aot vmservice shared library name
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size