5#include "flutter/shell/common/platform_view.h"
9#include "flutter/fml/make_copyable.h"
10#include "flutter/fml/synchronization/waitable_event.h"
11#include "flutter/shell/common/vsync_waiter_fallback.h"
23 <<
"This platform does not provide a Vsync waiter implementation. A "
24 "simple timer based fallback is being used.";
29 std::unique_ptr<PlatformMessage>
message) {
34 std::unique_ptr<PointerDataPacket> packet) {
59 std::unique_ptr<Surface>
surface;
67 surface = platform_view->CreateRenderingSurface();
68 if (surface && !surface->IsValid()) {
75 FML_LOG(
ERROR) <<
"Failed to create platform view rendering surface";
81void PlatformView::NotifyDestroyed() {
89void PlatformView::AddView(int64_t view_id,
92 delegate_.OnPlatformViewAddView(view_id, viewport_metrics,
101 FML_DLOG(WARNING) <<
"This platform does not set up the resource "
102 "context on the IO thread for async texture uploads.";
106std::shared_ptr<impeller::Context> PlatformView::GetImpellerContext()
const {
110void PlatformView::ReleaseResourceContext()
const {}
114 return std::make_unique<DefaultPointerDataDispatcher>(delegate);
119 return weak_factory_.GetWeakPtr();
122void PlatformView::UpdateSemantics(
127void PlatformView::SendChannelUpdate(
const std::string&
name,
bool listening) {}
129void PlatformView::HandlePlatformMessage(
130 std::unique_ptr<PlatformMessage>
message) {
131 if (
auto response =
message->response()) {
132 response->CompleteEmpty();
136void PlatformView::OnPreEngineRestart()
const {}
150std::unique_ptr<Surface> PlatformView::CreateRenderingSurface() {
153 FML_DCHECK(
false) <<
"This platform does not provide a rendering surface but "
154 "it was notified of surface rendering surface creation.";
158std::shared_ptr<ExternalViewEmbedder>
159PlatformView::CreateExternalViewEmbedder() {
161 <<
"This platform doesn't support embedding external views.";
173std::unique_ptr<std::vector<std::string>>
174PlatformView::ComputePlatformResolvedLocales(
175 const std::vector<std::string>& supported_locale_data) {
176 std::unique_ptr<std::vector<std::string>>
out =
177 std::make_unique<std::vector<std::string>>();
181void PlatformView::RequestDartDeferredLibrary(intptr_t loading_unit_id) {}
184 intptr_t loading_unit_id,
185 std::unique_ptr<const fml::Mapping> snapshot_data,
186 std::unique_ptr<const fml::Mapping> snapshot_instructions) {}
188void PlatformView::LoadDartDeferredLibraryError(
189 intptr_t loading_unit_id,
194void PlatformView::UpdateAssetResolverByType(
195 std::unique_ptr<AssetResolver> updated_asset_resolver,
197 delegate_.UpdateAssetResolverByType(std::move(updated_asset_resolver),
type);
200std::unique_ptr<SnapshotSurfaceProducer>
201PlatformView::CreateSnapshotSurfaceProducer() {
205std::shared_ptr<PlatformMessageHandler>
206PlatformView::GetPlatformMessageHandler()
const {
211 return delegate_.OnPlatformViewGetSettings();
214double PlatformView::GetScaledFontSize(
double unscaled_font_size,
215 int configuration_id)
const {
AssetResolverType
Identifies the type of AssetResolver an instance is.
The interface for Engine to implement.
fml::RefPtr< fml::TaskRunner > GetRasterTaskRunner() const
A Mapping like NonOwnedMapping, but uses Free as its release proc.
static void RunNowOrPostTask(const fml::RefPtr< fml::TaskRunner > &runner, const fml::closure &task)
TaskRunners task_runners_
FlutterSemanticsFlag flags
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_DLOG(severity)
#define FML_LOG(severity)
#define FML_UNREACHABLE()
#define FML_DCHECK(condition)
std::unordered_map< int32_t, SemanticsNode > SemanticsNodeUpdates
std::unordered_map< int32_t, CustomAccessibilityAction > CustomAccessibilityActionUpdates
static void MarkTextureFrameAvailable(JNIEnv *env, jobject jcaller, jlong shell_holder, jlong texture_id)
std::function< std::unique_ptr< PointerDataDispatcher >(PointerDataDispatcher::Delegate &)> PointerDataDispatcherMaker
Signature for constructing PointerDataDispatcher.
DEF_SWITCHES_START aot vmservice shared library name
static void LoadDartDeferredLibrary(JNIEnv *env, jobject obj, jlong shell_holder, jint jLoadingUnitId, jobjectArray jSearchPaths)
static void ScheduleFrame(JNIEnv *env, jobject jcaller, jlong shell_holder)
static void UnregisterTexture(JNIEnv *env, jobject jcaller, jlong shell_holder, jlong texture_id)
static void RegisterTexture(JNIEnv *env, jobject jcaller, jlong shell_holder, jlong texture_id, jobject surface_texture)
std::function< void()> closure