Flutter Engine
flutter::DartUI Class Reference

#include <dart_ui.h>

Static Public Member Functions

static void InitForGlobal ()
 
static void InitForIsolate ()
 

Detailed Description

Definition at line 12 of file dart_ui.h.

Member Function Documentation

◆ InitForGlobal()

void flutter::DartUI::InitForGlobal ( )
static

Definition at line 59 of file dart_ui.cc.

References flutter::DartRuntimeHooks::RegisterNatives(), flutter::IsolateNameServerNatives::RegisterNatives(), flutter::Vertices::RegisterNatives(), flutter::SceneHost::RegisterNatives(), flutter::FontCollection::RegisterNatives(), flutter::ImageFilter::RegisterNatives(), flutter::PictureRecorder::RegisterNatives(), flutter::SemanticsUpdate::RegisterNatives(), flutter::ImageShader::RegisterNatives(), flutter::Codec::RegisterNatives(), flutter::EngineLayer::RegisterNatives(), flutter::Picture::RegisterNatives(), flutter::Scene::RegisterNatives(), flutter::CanvasImage::RegisterNatives(), flutter::ColorFilter::RegisterNatives(), flutter::CanvasPathMeasure::RegisterNatives(), flutter::Paragraph::RegisterNatives(), flutter::SemanticsUpdateBuilder::RegisterNatives(), flutter::ImmutableBuffer::RegisterNatives(), flutter::CanvasGradient::RegisterNatives(), flutter::ParagraphBuilder::RegisterNatives(), flutter::CanvasPath::RegisterNatives(), flutter::ImageDescriptor::RegisterNatives(), flutter::SceneBuilder::RegisterNatives(), flutter::Canvas::RegisterNatives(), and flutter::PlatformConfiguration::RegisterNatives().

59  {
60  if (!g_natives) {
61  g_natives = new tonic::DartLibraryNatives();
62  Canvas::RegisterNatives(g_natives);
65  CanvasPath::RegisterNatives(g_natives);
67  Codec::RegisterNatives(g_natives);
77  Paragraph::RegisterNatives(g_natives);
79  Picture::RegisterNatives(g_natives);
81  Scene::RegisterNatives(g_natives);
85  Vertices::RegisterNatives(g_natives);
87 #if defined(LEGACY_FUCHSIA_EMBEDDER)
88  SceneHost::RegisterNatives(g_natives);
89 #endif
90  }
91 }
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Registers the native handlers for Dart functions that this class handles.
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: vertices.cc:42
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: canvas.cc:69
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: path.cc:65
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: image.cc:34
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: gradient.cc:32
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: color_filter.cc:32
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: codec.cc:33
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: path_measure.cc:39
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: scene_host.cc:123
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: image_filter.cc:33
static void RegisterNatives(tonic::DartLibraryNatives *natives)
Definition: image_shader.cc:27
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)
static void RegisterNatives(tonic::DartLibraryNatives *natives)

◆ InitForIsolate()

void flutter::DartUI::InitForIsolate ( )
static

Definition at line 93 of file dart_ui.cc.

References FML_DCHECK, and tonic::ToDart().

Referenced by flutter::DartIsolate::GetMessageHandlingTaskRunner().

93  {
94  FML_DCHECK(g_natives);
95  Dart_Handle result = Dart_SetNativeResolver(
96  Dart_LookupLibrary(ToDart("dart:ui")), GetNativeFunction, GetSymbol);
97  if (Dart_IsError(result)) {
98  Dart_PropagateError(result);
99  }
100 }
#define FML_DCHECK(condition)
Definition: logging.h:86
Dart_Handle ToDart(const T &object)

The documentation for this class was generated from the following files: