7#include <android/hardware_buffer_jni.h>
8#include <android/native_window_jni.h>
14#include "unicode/uchar.h"
31#define ANDROID_SHELL_HOLDER \
32 (reinterpret_cast<AndroidShellHolder*>(shell_holder))
65#define FLUTTER_FOR_EACH_JNI_METHOD(V) \
66 V(g_handle_platform_message_method, handlePlatformMessage, \
67 "(Ljava/lang/String;Ljava/nio/ByteBuffer;IJ)V") \
68 V(g_handle_platform_message_response_method, handlePlatformMessageResponse, \
69 "(ILjava/nio/ByteBuffer;)V") \
70 V(g_update_semantics_method, updateSemantics, \
71 "(Ljava/nio/ByteBuffer;[Ljava/lang/String;[Ljava/nio/ByteBuffer;)V") \
72 V(g_set_application_locale_method, setApplicationLocale, \
73 "(Ljava/lang/String;)V") \
74 V(g_set_semantics_tree_enabled_method, setSemanticsTreeEnabled, "(Z)V") \
75 V(g_on_display_platform_view_method, onDisplayPlatformView, \
76 "(IIIIIIILio/flutter/embedding/engine/mutatorsstack/" \
77 "FlutterMutatorsStack;)V") \
78 V(g_on_begin_frame_method, onBeginFrame, "()V") \
79 V(g_on_end_frame_method, onEndFrame, "()V") \
80 V(g_on_display_overlay_surface_method, onDisplayOverlaySurface, "(IIIII)V") \
81 V(g_create_transaction_method, createTransaction, \
82 "()Landroid/view/SurfaceControl$Transaction;") \
83 V(g_swap_transaction_method, swapTransactions, "()V") \
84 V(g_apply_transaction_method, applyTransactions, "()V") \
85 V(g_create_overlay_surface2_method, createOverlaySurface2, \
86 "()Lio/flutter/embedding/engine/FlutterOverlaySurface;") \
87 V(g_destroy_overlay_surface2_method, destroyOverlaySurface2, "()V") \
88 V(g_on_display_platform_view2_method, onDisplayPlatformView2, \
89 "(IIIIIIILio/flutter/embedding/engine/mutatorsstack/" \
90 "FlutterMutatorsStack;)V") \
91 V(g_hide_platform_view2_method, hidePlatformView2, "(I)V") \
92 V(g_on_end_frame2_method, endFrame2, "()V") \
93 V(g_show_overlay_surface2_method, showOverlaySurface2, "()V") \
94 V(g_hide_overlay_surface2_method, hideOverlaySurface2, "()V") \
95 V(g_get_scaled_font_size_method, getScaledFontSize, "(FI)F") \
96 V(g_update_custom_accessibility_actions_method, \
97 updateCustomAccessibilityActions, \
98 "(Ljava/nio/ByteBuffer;[Ljava/lang/String;)V") \
99 V(g_on_first_frame_method, onFirstFrame, "()V") \
100 V(g_on_engine_restart_method, onPreEngineRestart, "()V") \
101 V(g_create_overlay_surface_method, createOverlaySurface, \
102 "()Lio/flutter/embedding/engine/FlutterOverlaySurface;") \
103 V(g_destroy_overlay_surfaces_method, destroyOverlaySurfaces, "()V") \
104 V(g_maybe_resize_surface_view, maybeResizeSurfaceView, "(II)V") \
107#define FLUTTER_DECLARE_JNI(global_field, jni_name, jni_arg) \
108 static jmethodID global_field = nullptr;
110#define FLUTTER_BIND_JNI(global_field, jni_name, jni_arg) \
112 env->GetMethodID(g_flutter_jni_class->obj(), #jni_name, jni_arg); \
113 if (global_field == nullptr) { \
114 FML_LOG(ERROR) << "Could not locate " << #jni_name << " method."; \
185static jlong
AttachJNI(JNIEnv* env, jclass clazz, jobject flutterJNI) {
187 std::shared_ptr<PlatformViewAndroidJNI> jni_facade =
188 std::make_shared<PlatformViewAndroidJNIImpl>(java_object);
189 auto shell_holder = std::make_unique<AndroidShellHolder>(
192 if (shell_holder->IsValid()) {
193 return reinterpret_cast<jlong
>(shell_holder.release());
199static void DestroyJNI(JNIEnv* env, jobject jcaller, jlong shell_holder) {
218 jstring jInitialRoute,
219 jobject jEntrypointArgs,
222 if (jni ==
nullptr) {
223 FML_LOG(ERROR) <<
"Could not create a FlutterJNI instance";
228 std::shared_ptr<PlatformViewAndroidJNI> jni_facade =
229 std::make_shared<PlatformViewAndroidJNIImpl>(java_jni);
236 auto spawned_shell_holder =
238 initial_route, entrypoint_args, engineId);
240 if (spawned_shell_holder ==
nullptr || !spawned_shell_holder->IsValid()) {
241 FML_LOG(ERROR) <<
"Could not spawn Shell";
245 jobject javaLong = env->CallStaticObjectMethod(
247 reinterpret_cast<jlong
>(spawned_shell_holder.release()));
248 if (javaLong ==
nullptr) {
249 FML_LOG(ERROR) <<
"Could not create a Long instance";
266 auto window = fml::MakeRefCounted<AndroidNativeWindow>(
267 ANativeWindow_fromSurface(env, jsurface));
279 auto window = fml::MakeRefCounted<AndroidNativeWindow>(
280 ANativeWindow_fromSurface(env, jsurface));
304 jobject jAssetManager,
305 jobject jEntrypointArgs,
307 auto apk_asset_provider = std::make_unique<flutter::APKAssetProvider>(
317 libraryUrl, entrypoint_args, engineId);
324 if (cbInfo ==
nullptr) {
329 env->NewStringUTF(cbInfo->name.c_str()),
330 env->NewStringUTF(cbInfo->class_name.c_str()),
331 env->NewStringUTF(cbInfo->library_path.c_str()));
337 jfloat devicePixelRatio,
340 jint physicalPaddingTop,
341 jint physicalPaddingRight,
342 jint physicalPaddingBottom,
343 jint physicalPaddingLeft,
344 jint physicalViewInsetTop,
345 jint physicalViewInsetRight,
346 jint physicalViewInsetBottom,
347 jint physicalViewInsetLeft,
348 jint systemGestureInsetTop,
349 jint systemGestureInsetRight,
350 jint systemGestureInsetBottom,
351 jint systemGestureInsetLeft,
352 jint physicalTouchSlop,
353 jintArray javaDisplayFeaturesBounds,
354 jintArray javaDisplayFeaturesType,
355 jintArray javaDisplayFeaturesState,
356 jint physicalMinWidth,
357 jint physicalMaxWidth,
358 jint physicalMinHeight,
359 jint physicalMaxHeight) {
362 jsize rectSize = env->GetArrayLength(javaDisplayFeaturesBounds);
363 std::vector<int> boundsIntVector(rectSize);
364 env->GetIntArrayRegion(javaDisplayFeaturesBounds, 0, rectSize,
365 &boundsIntVector[0]);
366 std::vector<double> displayFeaturesBounds(boundsIntVector.begin(),
367 boundsIntVector.end());
368 jsize typeSize = env->GetArrayLength(javaDisplayFeaturesType);
369 std::vector<int> displayFeaturesType(typeSize);
370 env->GetIntArrayRegion(javaDisplayFeaturesType, 0, typeSize,
371 &displayFeaturesType[0]);
373 jsize stateSize = env->GetArrayLength(javaDisplayFeaturesState);
374 std::vector<int> displayFeaturesState(stateSize);
375 env->GetIntArrayRegion(javaDisplayFeaturesState, 0, stateSize,
376 &displayFeaturesState[0]);
380 static_cast<double>(devicePixelRatio),
381 static_cast<double>(physicalWidth),
382 static_cast<double>(physicalHeight),
383 static_cast<double>(physicalMinWidth),
384 static_cast<double>(physicalMaxWidth),
389 static_cast<double>(physicalPaddingTop),
390 static_cast<double>(physicalPaddingRight),
391 static_cast<double>(physicalPaddingBottom),
392 static_cast<double>(physicalPaddingLeft),
393 static_cast<double>(physicalViewInsetTop),
395 physicalViewInsetRight),
397 physicalViewInsetBottom),
398 static_cast<double>(physicalViewInsetLeft),
400 systemGestureInsetTop),
402 systemGestureInsetRight),
404 systemGestureInsetBottom),
406 systemGestureInsetLeft),
407 static_cast<double>(physicalTouchSlop),
408 displayFeaturesBounds,
410 displayFeaturesState,
420 jlong shell_holder) {
426 jlong shell_holder) {
430static jobject
GetBitmap(JNIEnv* env, jobject jcaller, jlong shell_holder) {
433 if (screenshot.data ==
nullptr) {
437 jstring argb = env->NewStringUTF(
"ARGB_8888");
438 if (argb ==
nullptr) {
442 jobject bitmap_config = env->CallStaticObjectMethod(
444 if (bitmap_config ==
nullptr) {
448 auto bitmap = env->CallStaticObjectMethod(
450 screenshot.frame_size.width, screenshot.frame_size.height, bitmap_config);
454 env->NewDirectByteBuffer(
const_cast<uint8_t*
>(screenshot.data->bytes()),
455 screenshot.data->size()));
493 jlong message_data) {
495 free(
reinterpret_cast<void*
>(message_data));
503 uint8_t*
data =
static_cast<uint8_t*
>(env->GetDirectBufferAddress(
buffer));
504 auto packet = std::make_unique<flutter::PointerDataPacket>(
data, position);
515 jint args_position) {
547 jobject surface_texture) {
558 jobject image_texture_entry,
559 jboolean reset_on_background) {
587static void ScheduleFrame(JNIEnv* env, jobject jcaller, jlong shell_holder) {
597 uint8_t* response_data =
598 static_cast<uint8_t*
>(env->GetDirectBufferAddress(
message));
600 auto mapping = std::make_unique<fml::MallocMapping>(
603 ->InvokePlatformMessageResponseCallback(responseId, std::move(mapping));
611 ->InvokePlatformMessageEmptyResponseCallback(responseId);
616 jlong shell_holder) {
623 return u_hasBinaryProperty(codePoint, UProperty::UCHAR_EMOJI);
629 return u_hasBinaryProperty(codePoint, UProperty::UCHAR_EMOJI_MODIFIER);
635 return u_hasBinaryProperty(codePoint, UProperty::UCHAR_EMOJI_MODIFIER_BASE);
641 return u_hasBinaryProperty(codePoint, UProperty::UCHAR_VARIATION_SELECTOR);
647 return u_hasBinaryProperty(codePoint, UProperty::UCHAR_REGIONAL_INDICATOR);
660 jboolean jTransient) {
663 static_cast<bool>(jTransient));
670 jobjectArray jSearchPaths) {
672 intptr_t loading_unit_id =
static_cast<intptr_t
>(jLoadingUnitId);
673 std::vector<std::string> search_paths =
678 void* handle =
nullptr;
679 while (handle ==
nullptr && !search_paths.empty()) {
680 std::string
path = search_paths.back();
681 handle = ::dlopen(
path.c_str(), RTLD_NOW);
682 search_paths.pop_back();
684 if (handle ==
nullptr) {
686 "No lib .so found for provided search paths.",
true);
693 std::unique_ptr<const fml::SymbolMapping> data_mapping =
694 std::make_unique<const fml::SymbolMapping>(
696 std::unique_ptr<const fml::SymbolMapping> instructions_mapping =
697 std::make_unique<const fml::SymbolMapping>(
701 loading_unit_id, std::move(data_mapping),
702 std::move(instructions_mapping));
708 jobject jAssetManager,
709 jstring jAssetBundlePath) {
710 auto asset_resolver = std::make_unique<flutter::APKAssetProvider>(
716 std::move(asset_resolver),
721 static const JNINativeMethod flutter_jni_methods[] = {
724 .name =
"nativeAttach",
725 .signature =
"(Lio/flutter/embedding/engine/FlutterJNI;)J",
726 .fnPtr =
reinterpret_cast<void*
>(&
AttachJNI),
729 .name =
"nativeDestroy",
731 .fnPtr =
reinterpret_cast<void*
>(&
DestroyJNI),
734 .name =
"nativeSpawn",
735 .signature =
"(JLjava/lang/String;Ljava/lang/String;Ljava/lang/"
736 "String;Ljava/util/List;J)Lio/flutter/"
737 "embedding/engine/FlutterJNI;",
738 .fnPtr =
reinterpret_cast<void*
>(&
SpawnJNI),
741 .name =
"nativeRunBundleAndSnapshotFromLibrary",
742 .signature =
"(JLjava/lang/String;Ljava/lang/String;"
743 "Ljava/lang/String;Landroid/content/res/"
744 "AssetManager;Ljava/util/List;J)V",
748 .name =
"nativeDispatchEmptyPlatformMessage",
749 .signature =
"(JLjava/lang/String;I)V",
753 .name =
"nativeCleanupMessageData",
758 .name =
"nativeDispatchPlatformMessage",
759 .signature =
"(JLjava/lang/String;Ljava/nio/ByteBuffer;II)V",
763 .name =
"nativeInvokePlatformMessageResponseCallback",
764 .signature =
"(JILjava/nio/ByteBuffer;I)V",
769 .name =
"nativeInvokePlatformMessageEmptyResponseCallback",
770 .signature =
"(JI)V",
771 .fnPtr =
reinterpret_cast<void*
>(
775 .name =
"nativeNotifyLowMemoryWarning",
782 .name =
"nativeGetBitmap",
783 .signature =
"(J)Landroid/graphics/Bitmap;",
784 .fnPtr =
reinterpret_cast<void*
>(&
GetBitmap),
787 .name =
"nativeSurfaceCreated",
788 .signature =
"(JLandroid/view/Surface;)V",
792 .name =
"nativeSurfaceWindowChanged",
793 .signature =
"(JLandroid/view/Surface;)V",
797 .name =
"nativeSurfaceChanged",
798 .signature =
"(JII)V",
802 .name =
"nativeSurfaceDestroyed",
807 .name =
"nativeSetViewportMetrics",
808 .signature =
"(JFIIIIIIIIIIIIIII[I[I[IIIII)V",
812 .name =
"nativeDispatchPointerDataPacket",
813 .signature =
"(JLjava/nio/ByteBuffer;I)V",
817 .name =
"nativeDispatchSemanticsAction",
818 .signature =
"(JIILjava/nio/ByteBuffer;I)V",
822 .name =
"nativeSetSemanticsEnabled",
823 .signature =
"(JZ)V",
827 .name =
"nativeSetAccessibilityFeatures",
828 .signature =
"(JI)V",
832 .name =
"nativeGetIsSoftwareRenderingEnabled",
837 .name =
"nativeRegisterTexture",
838 .signature =
"(JJLjava/lang/ref/"
843 .name =
"nativeRegisterImageTexture",
844 .signature =
"(JJLjava/lang/ref/"
849 .name =
"nativeMarkTextureFrameAvailable",
850 .signature =
"(JJ)V",
854 .name =
"nativeScheduleFrame",
859 .name =
"nativeUnregisterTexture",
860 .signature =
"(JJ)V",
865 .name =
"nativeLookupCallbackInformation",
866 .signature =
"(J)Lio/flutter/view/FlutterCallbackInformation;",
872 .name =
"nativeFlutterTextUtilsIsEmoji",
877 .name =
"nativeFlutterTextUtilsIsEmojiModifier",
882 .name =
"nativeFlutterTextUtilsIsEmojiModifierBase",
888 .name =
"nativeFlutterTextUtilsIsVariationSelector",
894 .name =
"nativeFlutterTextUtilsIsRegionalIndicator",
900 .name =
"nativeLoadDartDeferredLibrary",
901 .signature =
"(JI[Ljava/lang/String;)V",
905 .name =
"nativeUpdateJavaAssetManager",
907 "(JLandroid/content/res/AssetManager;Ljava/lang/String;)V",
911 .name =
"nativeDeferredComponentInstallFailure",
912 .signature =
"(ILjava/lang/String;Z)V",
916 .name =
"nativeUpdateDisplayMetrics",
921 .name =
"nativeIsSurfaceControlEnabled",
927 std::size(flutter_jni_methods)) != 0) {
928 FML_LOG(ERROR) <<
"Failed to RegisterNatives with FlutterJNI";
936 FML_LOG(ERROR) <<
"Could not locate FlutterJNI's nativeShellHolderId field";
944 FML_LOG(ERROR) <<
"Could not locate FlutterJNI's constructor";
949 "valueOf",
"(J)Ljava/lang/Long;");
951 FML_LOG(ERROR) <<
"Could not locate Long's constructor";
958 env, env->FindClass(
"io/flutter/embedding/engine/FlutterOverlaySurface"));
959 if (overlay_surface_class.is_null()) {
960 FML_LOG(ERROR) <<
"Could not locate FlutterOverlaySurface class";
964 env->GetMethodID(overlay_surface_class.
obj(),
"getId",
"()I");
966 FML_LOG(ERROR) <<
"Could not locate FlutterOverlaySurface#getId() method";
970 overlay_surface_class.
obj(),
"getSurface",
"()Landroid/view/Surface;");
973 <<
"Could not locate FlutterOverlaySurface#getSurface() method";
978 env, env->FindClass(
"android/graphics/Bitmap"));
980 FML_LOG(ERROR) <<
"Could not locate Bitmap Class";
986 "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;");
988 FML_LOG(ERROR) <<
"Could not locate Bitmap.createBitmap method";
993 g_bitmap_class->obj(),
"copyPixelsFromBuffer",
"(Ljava/nio/Buffer;)V");
995 FML_LOG(ERROR) <<
"Could not locate Bitmap.copyPixelsFromBuffer method";
1000 env, env->FindClass(
"android/graphics/Bitmap$Config"));
1002 FML_LOG(ERROR) <<
"Could not locate Bitmap.Config Class";
1008 "(Ljava/lang/String;)Landroid/graphics/Bitmap$Config;");
1010 FML_LOG(ERROR) <<
"Could not locate Bitmap.Config.valueOf method";
1018 if (env ==
nullptr) {
1019 FML_LOG(ERROR) <<
"No JNIEnv provided";
1024 env, env->FindClass(
"io/flutter/view/FlutterCallbackInformation"));
1026 FML_LOG(ERROR) <<
"Could not locate FlutterCallbackInformation class";
1032 "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
1034 FML_LOG(ERROR) <<
"Could not locate FlutterCallbackInformation constructor";
1039 env, env->FindClass(
"io/flutter/embedding/engine/FlutterJNI"));
1041 FML_LOG(ERROR) <<
"Failed to find FlutterJNI Class.";
1048 "io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack"));
1050 FML_LOG(ERROR) <<
"Could not locate FlutterMutatorsStack";
1057 FML_LOG(ERROR) <<
"Could not locate FlutterMutatorsStack.init method";
1065 <<
"Could not locate FlutterMutatorsStack.pushTransform method";
1073 <<
"Could not locate FlutterMutatorsStack.pushClipRect method";
1081 <<
"Could not locate FlutterMutatorsStack.pushClipRRect method";
1089 <<
"Could not locate FlutterMutatorsStack.pushOpacity method";
1095 "(Landroid/graphics/Path;)V");
1098 <<
"Could not locate FlutterMutatorsStack.pushClipPath method";
1103 env, env->FindClass(
"java/lang/ref/WeakReference"));
1105 FML_LOG(ERROR) <<
"Could not locate WeakReference class";
1112 FML_LOG(ERROR) <<
"Could not locate WeakReference.get method";
1117 env, env->FindClass(
1118 "io/flutter/embedding/engine/renderer/SurfaceTextureWrapper"));
1120 FML_LOG(ERROR) <<
"Could not locate SurfaceTextureWrapper class";
1128 FML_LOG(ERROR) <<
"Could not locate attachToGlContext method";
1137 <<
"Could not locate SurfaceTextureWrapper.shouldUpdate method";
1145 FML_LOG(ERROR) <<
"Could not locate updateTexImage method";
1153 FML_LOG(ERROR) <<
"Could not locate getTransformMatrix method";
1161 FML_LOG(ERROR) <<
"Could not locate detachFromGlContext method";
1166 env, env->FindClass(
"io/flutter/view/TextureRegistry$ImageConsumer"));
1168 FML_LOG(ERROR) <<
"Could not locate TextureRegistry.ImageConsumer class";
1174 "acquireLatestImage",
"()Landroid/media/Image;");
1176 FML_LOG(ERROR) <<
"Could not locate acquireLatestImage on "
1177 "TextureRegistry.ImageConsumer class";
1182 env, env->FindClass(
"android/media/Image"));
1184 FML_LOG(ERROR) <<
"Could not locate Image class";
1193 "()Landroid/hardware/HardwareBuffer;");
1203 FML_LOG(ERROR) <<
"Could not locate close on Image class";
1210 env, env->FindClass(
"android/hardware/HardwareBuffer"));
1226 "([Ljava/lang/String;)[Ljava/lang/String;");
1229 FML_LOG(ERROR) <<
"Could not locate computePlatformResolvedLocale method";
1237 FML_LOG(ERROR) <<
"Could not locate requestDartDeferredLibrary method";
1242 env, env->FindClass(
"java/lang/Long"));
1244 FML_LOG(ERROR) <<
"Could not locate java.lang.Long class";
1250 env, env->FindClass(
"android/graphics/Path"));
1252 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path class";
1258 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path constructor";
1263 path_class->obj(),
"setFillType",
"(Landroid/graphics/Path$FillType;)V");
1266 <<
"Could not locate android.graphics.Path.setFillType method";
1272 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path.moveTo method";
1277 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path.lineTo method";
1281 env->GetMethodID(
path_class->obj(),
"quadTo",
"(FFFF)V");
1283 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path.quadTo method";
1287 env->GetMethodID(
path_class->obj(),
"cubicTo",
"(FFFFFF)V");
1289 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path.cubicTo method";
1296 env->GetMethodID(
path_class->obj(),
"conicTo",
"(FFFFF)V");
1303 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path.close method";
1308 env, env->FindClass(
"android/graphics/Path$FillType"));
1310 FML_LOG(ERROR) <<
"Could not locate android.graphics.Path$FillType class";
1316 "Landroid/graphics/Path$FillType;");
1318 FML_LOG(ERROR) <<
"Could not locate Path.FillType.WINDING field";
1324 "Landroid/graphics/Path$FillType;");
1326 FML_LOG(ERROR) <<
"Could not locate Path.FillType.EVEN_ODD field";
1335 : java_object_(java_object) {}
1340 std::unique_ptr<flutter::PlatformMessage>
message,
1345 auto java_object = java_object_.
get(env);
1346 if (java_object.is_null()) {
1355 env, env->NewDirectByteBuffer(
1356 const_cast<uint8_t*
>(
message->data().GetMapping()),
1360 env->CallVoidMethod(java_object.obj(), g_handle_platform_message_method,
1361 java_channel.
obj(), message_array.
obj(), responseId,
1362 reinterpret_cast<jlong
>(mapping.
Release()));
1364 env->CallVoidMethod(java_object.obj(), g_handle_platform_message_method,
1365 java_channel.
obj(),
nullptr, responseId,
nullptr);
1372 std::string locale) {
1375 auto java_object = java_object_.
get(env);
1376 if (java_object.is_null()) {
1383 env->CallVoidMethod(java_object.obj(), g_set_application_locale_method,
1393 auto java_object = java_object_.
get(env);
1394 if (java_object.is_null()) {
1398 env->CallVoidMethod(java_object.obj(), g_set_semantics_tree_enabled_method,
1406 std::unique_ptr<fml::Mapping>
data) {
1411 auto java_object = java_object_.
get(env);
1412 if (java_object.is_null()) {
1417 if (
data ==
nullptr) {
1418 env->CallVoidMethod(java_object.obj(),
1419 g_handle_platform_message_response_method, responseId,
1424 env, env->NewDirectByteBuffer(
const_cast<uint8_t*
>(
data->GetMapping()),
1427 env->CallVoidMethod(java_object.obj(),
1428 g_handle_platform_message_response_method, responseId,
1437 int configuration_id)
const {
1440 auto java_object = java_object_.
get(env);
1441 if (java_object.is_null()) {
1445 const jfloat scaledSize = env->CallFloatMethod(
1446 java_object.obj(), g_get_scaled_font_size_method,
1447 static_cast<jfloat
>(
font_size),
static_cast<jint
>(configuration_id));
1449 return static_cast<double>(scaledSize);
1453 std::vector<uint8_t> buffer,
1454 std::vector<std::string> strings,
1455 std::vector<std::vector<uint8_t>> string_attribute_args) {
1458 auto java_object = java_object_.
get(env);
1459 if (java_object.is_null()) {
1464 env, env->NewDirectByteBuffer(
buffer.data(),
buffer.size()));
1470 env->CallVoidMethod(java_object.obj(), g_update_semantics_method,
1471 direct_buffer.
obj(), jstrings.
obj(),
1472 jstring_attribute_args.
obj());
1478 std::vector<uint8_t> actions_buffer,
1479 std::vector<std::string> strings) {
1482 auto java_object = java_object_.
get(env);
1483 if (java_object.is_null()) {
1489 env->NewDirectByteBuffer(actions_buffer.data(), actions_buffer.size()));
1494 env->CallVoidMethod(java_object.obj(),
1495 g_update_custom_accessibility_actions_method,
1496 direct_actions_buffer.
obj(), jstrings.
obj());
1504 auto java_object = java_object_.
get(env);
1505 if (java_object.is_null()) {
1509 env->CallVoidMethod(java_object.obj(), g_on_first_frame_method);
1517 auto java_object = java_object_.
get(env);
1518 if (java_object.is_null()) {
1522 env->CallVoidMethod(java_object.obj(), g_on_engine_restart_method);
1532 if (surface_texture.is_null()) {
1537 env, env->CallObjectMethod(surface_texture.obj(),
1540 if (surface_texture_local_ref.is_null()) {
1544 env->CallVoidMethod(surface_texture_local_ref.
obj(),
1554 if (surface_texture.is_null()) {
1559 env, env->CallObjectMethod(surface_texture.obj(),
1561 if (surface_texture_local_ref.is_null()) {
1565 jboolean shouldUpdate = env->CallBooleanMethod(
1570 return shouldUpdate;
1577 if (surface_texture.is_null()) {
1582 env, env->CallObjectMethod(surface_texture.obj(),
1584 if (surface_texture_local_ref.is_null()) {
1588 env->CallVoidMethod(surface_texture_local_ref.
obj(),
1598 if (surface_texture.is_null()) {
1603 env, env->CallObjectMethod(surface_texture.obj(),
1605 if (surface_texture_local_ref.is_null()) {
1610 env, env->NewFloatArray(16));
1612 env->CallVoidMethod(surface_texture_local_ref.
obj(),
1616 float* m = env->GetFloatArrayElements(transformMatrix.
obj(),
nullptr);
1618 static_assert(
sizeof(SkScalar) ==
sizeof(
float));
1619 const auto transform = SkM44::ColMajor(m);
1621 env->ReleaseFloatArrayElements(transformMatrix.
obj(), m, JNI_ABORT);
1630 if (surface_texture.is_null()) {
1635 env, env->CallObjectMethod(surface_texture.obj(),
1637 if (surface_texture_local_ref.is_null()) {
1641 env->CallVoidMethod(surface_texture_local_ref.
obj(),
1652 if (image_producer_texture_entry.is_null()) {
1660 env, env->CallObjectMethod(image_producer_texture_entry.obj(),
1663 if (image_producer_texture_entry_local_ref.is_null()) {
1669 env, env->CallObjectMethod(image_producer_texture_entry_local_ref.
obj(),
1682 if (
image.is_null()) {
1695 if (
image.is_null()) {
1706 if (hardware_buffer.is_null()) {
1723 auto java_object = java_object_.
get(env);
1724 if (java_object.is_null()) {
1731 std::vector<std::shared_ptr<Mutator>>::const_iterator iter =
1732 mutators_stack.
Begin();
1733 while (iter != mutators_stack.
End()) {
1734 switch ((*iter)->GetType()) {
1736 const DlMatrix& matrix = (*iter)->GetMatrix();
1738 matrix.
m[0], matrix.
m[4], matrix.
m[12],
1739 matrix.
m[1], matrix.
m[5], matrix.
m[13],
1740 matrix.
m[3], matrix.
m[7], matrix.
m[15],
1743 env, env->NewFloatArray(9));
1745 env->SetFloatArrayRegion(transformMatrix.
obj(), 0, 9, matrix_array);
1746 env->CallVoidMethod(mutatorsStack,
1748 transformMatrix.
obj());
1752 const DlRect& rect = (*iter)->GetRect();
1753 env->CallVoidMethod(mutatorsStack,
1755 static_cast<int>(rect.
GetLeft()),
1756 static_cast<int>(rect.
GetTop()),
1765 SkScalar radiis[8] = {
1772 env, env->NewFloatArray(8));
1773 env->SetFloatArrayRegion(radiisArray.
obj(), 0, 8, radiis);
1774 env->CallVoidMethod(mutatorsStack,
1776 static_cast<int>(rect.
GetLeft()),
1777 static_cast<int>(rect.
GetTop()),
1784 const DlRoundRect& rrect = (*iter)->GetRSEApproximation();
1787 SkScalar radiis[8] = {
1794 env, env->NewFloatArray(8));
1795 env->SetFloatArrayRegion(radiisArray.
obj(), 0, 8, radiis);
1796 env->CallVoidMethod(mutatorsStack,
1798 static_cast<int>(rect.
GetLeft()),
1799 static_cast<int>(rect.
GetTop()),
1819 env->CallVoidMethod(java_object.obj(), g_on_display_platform_view_method,
1834 auto java_object = java_object_.
get(env);
1835 if (java_object.is_null()) {
1839 env->CallVoidMethod(java_object.obj(), g_on_display_overlay_surface_method,
1848 auto java_object = java_object_.
get(env);
1849 if (java_object.is_null()) {
1853 env->CallVoidMethod(java_object.obj(), g_on_begin_frame_method);
1861 auto java_object = java_object_.
get(env);
1862 if (java_object.is_null()) {
1866 env->CallVoidMethod(java_object.obj(), g_on_end_frame_method);
1871std::unique_ptr<PlatformViewAndroidJNI::OverlayMetadata>
1875 auto java_object = java_object_.
get(env);
1876 if (java_object.is_null()) {
1881 env, env->CallObjectMethod(java_object.obj(),
1882 g_create_overlay_surface_method));
1885 if (overlay.is_null()) {
1886 return std::make_unique<PlatformViewAndroidJNI::OverlayMetadata>(0,
1893 jobject overlay_surface =
1896 auto overlay_window = fml::MakeRefCounted<AndroidNativeWindow>(
1897 ANativeWindow_fromSurface(env, overlay_surface));
1899 return std::make_unique<PlatformViewAndroidJNI::OverlayMetadata>(
1900 overlay_id, std::move(overlay_window));
1906 auto java_object = java_object_.
get(env);
1907 if (java_object.is_null()) {
1911 env->CallVoidMethod(java_object.obj(), g_destroy_overlay_surfaces_method);
1916std::unique_ptr<std::vector<std::string>>
1918 std::vector<std::string> supported_locales_data) {
1921 std::unique_ptr<std::vector<std::string>> out =
1922 std::make_unique<std::vector<std::string>>();
1924 auto java_object = java_object_.
get(env);
1925 if (java_object.is_null()) {
1930 jobjectArray result =
static_cast<jobjectArray
>(env->CallObjectMethod(
1932 j_locales_data.
obj()));
1936 int length = env->GetArrayLength(result);
1939 env,
static_cast<jstring
>(env->GetObjectArrayElement(result,
i))));
1947 auto java_object = java_object_.
get(env);
1948 if (java_object.is_null()) {
1953 env, env->GetObjectClass(java_object.obj()));
1954 if (clazz.is_null()) {
1958 jfieldID fid = env->GetStaticFieldID(clazz.
obj(),
"refreshRateFPS",
"F");
1959 return static_cast<double>(env->GetStaticFloatField(clazz.
obj(), fid));
1965 auto java_object = java_object_.
get(env);
1966 if (java_object.is_null()) {
1971 env, env->GetObjectClass(java_object.obj()));
1972 if (clazz.is_null()) {
1976 jfieldID fid = env->GetStaticFieldID(clazz.
obj(),
"displayWidth",
"F");
1977 return static_cast<double>(env->GetStaticFloatField(clazz.
obj(), fid));
1983 auto java_object = java_object_.
get(env);
1984 if (java_object.is_null()) {
1989 env, env->GetObjectClass(java_object.obj()));
1990 if (clazz.is_null()) {
1994 jfieldID fid = env->GetStaticFieldID(clazz.
obj(),
"displayHeight",
"F");
1995 return static_cast<double>(env->GetStaticFloatField(clazz.
obj(), fid));
2001 auto java_object = java_object_.
get(env);
2002 if (java_object.is_null()) {
2007 env, env->GetObjectClass(java_object.obj()));
2008 if (clazz.is_null()) {
2012 jfieldID fid = env->GetStaticFieldID(clazz.
obj(),
"displayDensity",
"F");
2013 return static_cast<double>(env->GetStaticFloatField(clazz.
obj(), fid));
2017 int loading_unit_id) {
2020 auto java_object = java_object_.
get(env);
2021 if (java_object.is_null()) {
2037 auto java_object = java_object_.
get(env);
2038 if (java_object.is_null()) {
2044 env->CallObjectMethod(java_object.obj(), g_create_transaction_method));
2045 if (transaction.is_null()) {
2051 env, transaction.
obj());
2057 auto java_object = java_object_.
get(env);
2058 if (java_object.is_null()) {
2062 env->CallVoidMethod(java_object.obj(), g_swap_transaction_method);
2070 auto java_object = java_object_.
get(env);
2071 if (java_object.is_null()) {
2075 env->CallVoidMethod(java_object.obj(), g_apply_transaction_method);
2080std::unique_ptr<PlatformViewAndroidJNI::OverlayMetadata>
2084 auto java_object = java_object_.
get(env);
2085 if (java_object.is_null()) {
2090 env, env->CallObjectMethod(java_object.obj(),
2091 g_create_overlay_surface2_method));
2094 if (overlay.is_null()) {
2095 return std::make_unique<PlatformViewAndroidJNI::OverlayMetadata>(0,
2102 jobject overlay_surface =
2105 auto overlay_window = fml::MakeRefCounted<AndroidNativeWindow>(
2106 ANativeWindow_fromSurface(env, overlay_surface));
2108 return std::make_unique<PlatformViewAndroidJNI::OverlayMetadata>(
2109 overlay_id, std::move(overlay_window));
2115 auto java_object = java_object_.
get(env);
2116 if (java_object.is_null()) {
2120 env->CallVoidMethod(java_object.obj(), g_destroy_overlay_surface2_method);
2128 explicit AndroidPathReceiver(JNIEnv* env)
2133 jfieldID fill_type_field_id;
2135 case DlPathFillType::kOdd:
2138 case DlPathFillType::kNonZero:
2152 fill_type_field_id));
2158 fill_type_enum.
obj());
2162 void MoveTo(
const DlPoint& p2,
bool will_be_closed)
override {
2170 cp.x, cp.y, p2.x, p2.y);
2177 cp.x, cp.y, p2.x, p2.y, weight);
2184 cp1.x, cp1.y, cp2.x, cp2.y, p2.x, p2.y);
2186 void Close()
override {
2190 jobject TakePath()
const {
return android_path_; }
2194 jobject android_path_;
2208 auto java_object = java_object_.
get(env);
2209 if (java_object.is_null()) {
2216 std::vector<std::shared_ptr<Mutator>>::const_iterator iter =
2217 mutators_stack.
Begin();
2218 while (iter != mutators_stack.
End()) {
2219 switch ((*iter)->GetType()) {
2221 const DlMatrix& matrix = (*iter)->GetMatrix();
2223 matrix.
m[0], matrix.
m[4], matrix.
m[12],
2224 matrix.
m[1], matrix.
m[5], matrix.
m[13],
2225 matrix.
m[3], matrix.
m[7], matrix.
m[15],
2228 env, env->NewFloatArray(9));
2230 env->SetFloatArrayRegion(transformMatrix.
obj(), 0, 9, matrix_array);
2231 env->CallVoidMethod(mutatorsStack,
2233 transformMatrix.
obj());
2237 const DlRect& rect = (*iter)->GetRect();
2238 env->CallVoidMethod(mutatorsStack,
2240 static_cast<int>(rect.
GetLeft()),
2241 static_cast<int>(rect.
GetTop()),
2250 SkScalar radiis[8] = {
2257 env, env->NewFloatArray(8));
2258 env->SetFloatArrayRegion(radiisArray.
obj(), 0, 8, radiis);
2259 env->CallVoidMethod(mutatorsStack,
2261 static_cast<int>(rect.
GetLeft()),
2262 static_cast<int>(rect.
GetTop()),
2269 const DlRoundRect& rrect = (*iter)->GetRSEApproximation();
2272 SkScalar radiis[8] = {
2279 env, env->NewFloatArray(8));
2280 env->SetFloatArrayRegion(radiisArray.
obj(), 0, 8, radiis);
2281 env->CallVoidMethod(mutatorsStack,
2283 static_cast<int>(rect.
GetLeft()),
2284 static_cast<int>(rect.
GetTop()),
2291 float opacity = (*iter)->GetAlphaFloat();
2297 auto& dlPath = (*iter)->GetPath();
2307 AndroidPathReceiver receiver(env);
2308 receiver.SetFillType(dlPath.GetFillType());
2313 dlPath.Dispatch(receiver);
2315 env->CallVoidMethod(mutatorsStack,
2317 receiver.TakePath());
2332 env->CallVoidMethod(java_object.obj(), g_on_display_platform_view2_method,
2341 auto java_object = java_object_.
get(env);
2342 if (java_object.is_null()) {
2346 env->CallVoidMethod(java_object.obj(), g_hide_platform_view2_method,
view_id);
2352 auto java_object = java_object_.
get(env);
2353 if (java_object.is_null()) {
2357 env->CallVoidMethod(java_object.obj(), g_on_end_frame2_method);
2365 auto java_object = java_object_.
get(env);
2366 if (java_object.is_null()) {
2370 env->CallVoidMethod(java_object.obj(), g_show_overlay_surface2_method);
2377 auto java_object = java_object_.
get(env);
2378 if (java_object.is_null()) {
2382 env->CallVoidMethod(java_object.obj(), g_hide_overlay_surface2_method);
2390 auto java_object = java_object_.
get(env);
2391 if (java_object.is_null()) {
2395 env->CallVoidMethod(java_object.obj(), g_maybe_resize_surface_view,
width,
static std::unique_ptr< DartCallbackRepresentation > GetCallbackInformation(int64_t handle)
static const char * kIsolateDataSymbol
static const char * kIsolateInstructionsSymbol
const flutter::Settings & GetSettings() const
static FlutterMain & Get()
ImageLifecycle
Whether the last image should be reset when the context is destroyed.
const std::vector< std::shared_ptr< Mutator > >::const_iterator End() const
const std::vector< std::shared_ptr< Mutator > >::const_iterator Begin() const
A Mapping like NonOwnedMapping, but uses Free as its release proc.
static MallocMapping Copy(const T *begin, const T *end)
static fml::RefPtr< NativeLibrary > CreateWithHandle(Handle handle, bool close_handle_when_done)
ScopedJavaLocalRef< jobject > get(JNIEnv *env) const
Collection of functions to receive path segments from the underlying path representation via the DlPa...
FlutterVulkanImage * image
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
G_BEGIN_DECLS FlutterViewId view_id
#define FML_LOG(severity)
#define FML_CHECK(condition)
#define FML_DCHECK(condition)
std::shared_ptr< SkBitmap > bitmap
static jmethodID g_hardware_buffer_close_method
impeller::Scalar DlScalar
static void RunBundleAndSnapshotFromLibrary(JNIEnv *env, jobject jcaller, jlong shell_holder, jstring jBundlePath, jstring jEntrypoint, jstring jLibraryUrl, jobject jAssetManager, jobject jEntrypointArgs, jlong engineId)
static jmethodID g_mutators_stack_init_method
constexpr int64_t kFlutterImplicitViewId
static jfieldID g_jni_shell_holder_field
static void InvokePlatformMessageResponseCallback(JNIEnv *env, jobject jcaller, jlong shell_holder, jint responseId, jobject message, jint position)
static jmethodID g_request_dart_deferred_library_method
static jboolean GetIsSoftwareRendering(JNIEnv *env, jobject jcaller)
static bool IsSurfaceControlEnabled(JNIEnv *env, jobject jcaller, jlong shell_holder)
static void DispatchPointerDataPacket(JNIEnv *env, jobject jcaller, jlong shell_holder, jobject buffer, jint position)
bool RegisterApi(JNIEnv *env)
static jmethodID g_mutators_stack_push_clippath_method
static jboolean FlutterTextUtilsIsEmojiModifier(JNIEnv *env, jobject obj, jint codePoint)
static fml::jni::ScopedJavaGlobalRef< jclass > * path_class
static fml::jni::ScopedJavaGlobalRef< jclass > * g_java_long_class
static void LoadLoadingUnitFailure(intptr_t loading_unit_id, const std::string &message, bool transient)
static void InvokePlatformMessageEmptyResponseCallback(JNIEnv *env, jobject jcaller, jlong shell_holder, jint responseId)
impeller::ISize32 DlISize
static jmethodID g_acquire_latest_image_method
static jmethodID g_mutators_stack_push_transform_method
static fml::jni::ScopedJavaGlobalRef< jclass > * g_bitmap_class
std::nullptr_t JavaLocalRef
static void SurfaceDestroyed(JNIEnv *env, jobject jcaller, jlong shell_holder)
static jmethodID path_line_to_method
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
static jmethodID path_quad_to_method
static jmethodID g_long_constructor
static void DestroyJNI(JNIEnv *env, jobject jcaller, jlong shell_holder)
static void DispatchSemanticsAction(JNIEnv *env, jobject jcaller, jlong shell_holder, jint id, jint action, jobject args, jint args_position)
static jmethodID g_jni_constructor
static void MarkTextureFrameAvailable(JNIEnv *env, jobject jcaller, jlong shell_holder, jlong texture_id)
static jmethodID g_attach_to_gl_context_method
static jfieldID g_path_fill_type_even_odd_field
static void SetSemanticsEnabled(JNIEnv *env, jobject jcaller, jlong shell_holder, jboolean enabled)
static void DeferredComponentInstallFailure(JNIEnv *env, jobject obj, jint jLoadingUnitId, jstring jError, jboolean jTransient)
static jobject SpawnJNI(JNIEnv *env, jobject jcaller, jlong shell_holder, jstring jEntrypoint, jstring jLibraryUrl, jstring jInitialRoute, jobject jEntrypointArgs, jlong engineId)
@ kBackdropClipRSuperellipse
static jfieldID g_path_fill_type_winding_field
static fml::jni::ScopedJavaGlobalRef< jclass > * g_texture_wrapper_class
static void LoadDartDeferredLibrary(JNIEnv *env, jobject obj, jlong shell_holder, jint jLoadingUnitId, jobjectArray jSearchPaths)
static jmethodID g_java_weak_reference_get_method
static void NotifyLowMemoryWarning(JNIEnv *env, jobject obj, jlong shell_holder)
static jboolean FlutterTextUtilsIsVariationSelector(JNIEnv *env, jobject obj, jint codePoint)
static jmethodID g_image_get_hardware_buffer_method
static void CleanupMessageData(JNIEnv *env, jobject jcaller, jlong message_data)
static jmethodID g_mutators_stack_push_cliprect_method
static jmethodID g_overlay_surface_surface_method
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
static void DispatchPlatformMessage(JNIEnv *env, jobject jcaller, jlong shell_holder, jstring channel, jobject message, jint position, jint responseId)
static jmethodID g_overlay_surface_id_method
static jmethodID g_mutators_stack_push_cliprrect_method
static jmethodID g_get_transform_matrix_method
static jmethodID path_cubic_to_method
static jmethodID g_compute_platform_resolved_locale_method
static void SurfaceWindowChanged(JNIEnv *env, jobject jcaller, jlong shell_holder, jobject jsurface)
static jmethodID g_bitmap_copy_pixels_from_buffer_method
impeller::FillType DlPathFillType
static void RegisterImageTexture(JNIEnv *env, jobject jcaller, jlong shell_holder, jlong texture_id, jobject image_texture_entry, jboolean reset_on_background)
static fml::jni::ScopedJavaGlobalRef< jclass > * g_flutter_jni_class
static fml::jni::ScopedJavaGlobalRef< jclass > * g_bitmap_config_class
static jmethodID g_surface_texture_wrapper_should_update
static fml::jni::ScopedJavaGlobalRef< jclass > * g_image_class
static void SurfaceCreated(JNIEnv *env, jobject jcaller, jlong shell_holder, jobject jsurface)
static jmethodID g_flutter_callback_info_constructor
static jmethodID path_set_fill_type_method
static void DispatchEmptyPlatformMessage(JNIEnv *env, jobject jcaller, jlong shell_holder, jstring channel, jint responseId)
static fml::jni::ScopedJavaGlobalRef< jclass > * g_path_fill_type_class
static void ScheduleFrame(JNIEnv *env, jobject jcaller, jlong shell_holder)
static jmethodID path_move_to_method
static jlong AttachJNI(JNIEnv *env, jclass clazz, jobject flutterJNI)
static void SetAccessibilityFeatures(JNIEnv *env, jobject jcaller, jlong shell_holder, jint flags)
static jmethodID g_update_tex_image_method
static fml::jni::ScopedJavaGlobalRef< jclass > * g_java_weak_reference_class
static jmethodID g_image_close_method
static void UpdateDisplayMetrics(JNIEnv *env, jobject jcaller, jlong shell_holder)
static jmethodID g_mutators_stack_push_opacity_method
static void SurfaceChanged(JNIEnv *env, jobject jcaller, jlong shell_holder, jint width, jint height)
static void SetViewportMetrics(JNIEnv *env, jobject jcaller, jlong shell_holder, jfloat devicePixelRatio, jint physicalWidth, jint physicalHeight, jint physicalPaddingTop, jint physicalPaddingRight, jint physicalPaddingBottom, jint physicalPaddingLeft, jint physicalViewInsetTop, jint physicalViewInsetRight, jint physicalViewInsetBottom, jint physicalViewInsetLeft, jint systemGestureInsetTop, jint systemGestureInsetRight, jint systemGestureInsetBottom, jint systemGestureInsetLeft, jint physicalTouchSlop, jintArray javaDisplayFeaturesBounds, jintArray javaDisplayFeaturesType, jintArray javaDisplayFeaturesState, jint physicalMinWidth, jint physicalMaxWidth, jint physicalMinHeight, jint physicalMaxHeight)
static jmethodID g_bitmap_config_value_of
static fml::jni::ScopedJavaGlobalRef< jclass > * g_image_consumer_texture_registry_interface
static void UpdateJavaAssetManager(JNIEnv *env, jobject obj, jlong shell_holder, jobject jAssetManager, jstring jAssetBundlePath)
static jobject GetBitmap(JNIEnv *env, jobject jcaller, jlong shell_holder)
static jmethodID path_constructor
static jmethodID g_bitmap_create_bitmap_method
static void UnregisterTexture(JNIEnv *env, jobject jcaller, jlong shell_holder, jlong texture_id)
static fml::jni::ScopedJavaGlobalRef< jclass > * g_flutter_callback_info_class
static fml::jni::ScopedJavaGlobalRef< jclass > * g_mutators_stack_class
static jmethodID path_close_method
static jboolean FlutterTextUtilsIsEmojiModifierBase(JNIEnv *env, jobject obj, jint codePoint)
static jobject LookupCallbackInformation(JNIEnv *env, jobject, jlong handle)
static jboolean FlutterTextUtilsIsRegionalIndicator(JNIEnv *env, jobject obj, jint codePoint)
static jmethodID g_detach_from_gl_context_method
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set profile Make the profiler discard new samples once the profiler sample buffer is full When this flag is not the profiler sample buffer is used as a ring buffer
static jmethodID path_conic_to_method
static fml::jni::ScopedJavaGlobalRef< jclass > * g_hardware_buffer_class
static jboolean FlutterTextUtilsIsEmoji(JNIEnv *env, jobject obj, jint codePoint)
static void RegisterTexture(JNIEnv *env, jobject jcaller, jlong shell_holder, jlong texture_id, jobject surface_texture)
static constexpr double kUnknownDisplayRefreshRate
To be used when the display refresh rate is unknown.
JNIEnv * AttachCurrentThread()
ScopedJavaLocalRef< jobjectArray > VectorToBufferArray(JNIEnv *env, const std::vector< std::vector< uint8_t > > &vector)
std::string JavaStringToString(JNIEnv *env, jstring str)
bool ClearException(JNIEnv *env, bool silent)
bool CheckException(JNIEnv *env)
ScopedJavaLocalRef< jobjectArray > VectorToStringArray(JNIEnv *env, const std::vector< std::string > &vector)
std::vector< std::string > StringListToVector(JNIEnv *env, jobject list)
std::vector< std::string > StringArrayToVector(JNIEnv *env, jobjectArray array)
ScopedJavaLocalRef< jstring > StringToJavaString(JNIEnv *env, const std::string &u8_string)
const ProcTable & GetProcTable()
void MoveTo(PathBuilder *builder, Scalar x, Scalar y)
void LineTo(PathBuilder *builder, Scalar x, Scalar y)
void CubicTo(PathBuilder *builder, Scalar x1, Scalar y1, Scalar x2, Scalar y2, Scalar x3, Scalar y3)
void Close(PathBuilder *builder)
bool enable_software_rendering
A 4x4 matrix using column-major storage.
constexpr const RoundingRadii & GetRadii() const
constexpr const Rect & GetBounds() const
constexpr auto GetBottom() const
constexpr auto GetTop() const
constexpr auto GetLeft() const
constexpr auto GetRight() const