Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
engine_unittests.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/shell/common/engine.h"
6
7#include <cstring>
8
9#include "flutter/runtime/dart_vm_lifecycle.h"
10#include "flutter/shell/common/thread_host.h"
11#include "flutter/testing/fixture_test.h"
12#include "flutter/testing/testing.h"
13#include "fml/mapping.h"
14#include "gmock/gmock.h"
16#include "rapidjson/document.h"
17#include "rapidjson/stringbuffer.h"
18#include "rapidjson/writer.h"
21
22namespace flutter {
23
24namespace {
25
26class FontManifestAssetResolver : public AssetResolver {
27 public:
28 FontManifestAssetResolver() {}
29
30 bool IsValid() const override { return true; }
31
32 bool IsValidAfterAssetManagerChange() const override { return true; }
33
36 }
37
38 mutable size_t mapping_call_count = 0u;
39 std::unique_ptr<fml::Mapping> GetAsMapping(
40 const std::string& asset_name) const override {
42 if (asset_name == "FontManifest.json") {
43 return std::make_unique<fml::DataMapping>("[{},{},{}]");
44 }
45 return nullptr;
46 }
47
48 std::vector<std::unique_ptr<fml::Mapping>> GetAsMappings(
49 const std::string& asset_pattern,
50 const std::optional<std::string>& subdir) const override {
51 return {};
52 };
53
54 bool operator==(const AssetResolver& other) const override {
55 auto mapping = GetAsMapping("FontManifest.json");
56 return memcmp(other.GetAsMapping("FontManifest.json")->GetMapping(),
57 mapping->GetMapping(), mapping->GetSize()) == 0;
58 }
59};
60
61class MockDelegate : public Engine::Delegate {
62 public:
63 MOCK_METHOD(void,
64 OnEngineUpdateSemantics,
66 (override));
67 MOCK_METHOD(void,
68 OnEngineHandlePlatformMessage,
69 (std::unique_ptr<PlatformMessage>),
70 (override));
71 MOCK_METHOD(void, OnPreEngineRestart, (), (override));
72 MOCK_METHOD(void, OnRootIsolateCreated, (), (override));
73 MOCK_METHOD(void,
74 UpdateIsolateDescription,
75 (const std::string, int64_t),
76 (override));
77 MOCK_METHOD(void, SetNeedsReportTimings, (bool), (override));
78 MOCK_METHOD(std::unique_ptr<std::vector<std::string>>,
79 ComputePlatformResolvedLocale,
80 (const std::vector<std::string>&),
81 (override));
82 MOCK_METHOD(void, RequestDartDeferredLibrary, (intptr_t), (override));
83 MOCK_METHOD(fml::TimePoint, GetCurrentTimePoint, (), (override));
84 MOCK_METHOD(const std::shared_ptr<PlatformMessageHandler>&,
85 GetPlatformMessageHandler,
86 (),
87 (const, override));
88 MOCK_METHOD(void, OnEngineChannelUpdate, (std::string, bool), (override));
89 MOCK_METHOD(double,
90 GetScaledFontSize,
91 (double font_size, int configuration_id),
92 (const, override));
93};
94
95class MockResponse : public PlatformMessageResponse {
96 public:
97 MOCK_METHOD(void, Complete, (std::unique_ptr<fml::Mapping> data), (override));
98 MOCK_METHOD(void, CompleteEmpty, (), (override));
99};
100
101class MockRuntimeDelegate : public RuntimeDelegate {
102 public:
103 MOCK_METHOD(std::string, DefaultRouteName, (), (override));
104 MOCK_METHOD(void, ScheduleFrame, (bool), (override));
105 MOCK_METHOD(void, OnAllViewsRendered, (), (override));
106 MOCK_METHOD(void,
107 Render,
108 (int64_t, std::unique_ptr<flutter::LayerTree>, float),
109 (override));
110 MOCK_METHOD(void,
111 UpdateSemantics,
113 (override));
114 MOCK_METHOD(void,
115 HandlePlatformMessage,
116 (std::unique_ptr<PlatformMessage>),
117 (override));
118 MOCK_METHOD(FontCollection&, GetFontCollection, (), (override));
119 MOCK_METHOD(std::shared_ptr<AssetManager>, GetAssetManager, (), (override));
120 MOCK_METHOD(void, OnRootIsolateCreated, (), (override));
121 MOCK_METHOD(void,
122 UpdateIsolateDescription,
123 (const std::string, int64_t),
124 (override));
125 MOCK_METHOD(void, SetNeedsReportTimings, (bool), (override));
126 MOCK_METHOD(std::unique_ptr<std::vector<std::string>>,
127 ComputePlatformResolvedLocale,
128 (const std::vector<std::string>&),
129 (override));
130 MOCK_METHOD(void, RequestDartDeferredLibrary, (intptr_t), (override));
131 MOCK_METHOD(std::weak_ptr<PlatformMessageHandler>,
132 GetPlatformMessageHandler,
133 (),
134 (const, override));
135 MOCK_METHOD(void, SendChannelUpdate, (std::string, bool), (override));
136 MOCK_METHOD(double,
137 GetScaledFontSize,
138 (double font_size, int configuration_id),
139 (const, override));
140};
141
142class MockRuntimeController : public RuntimeController {
143 public:
144 MockRuntimeController(RuntimeDelegate& client,
145 const TaskRunners& p_task_runners)
146 : RuntimeController(client, p_task_runners) {}
147 MOCK_METHOD(bool, IsRootIsolateRunning, (), (override));
148 MOCK_METHOD(bool,
150 (std::unique_ptr<PlatformMessage>),
151 (override));
152 MOCK_METHOD(void,
153 LoadDartDeferredLibraryError,
154 (intptr_t, const std::string, bool),
155 (override));
156 MOCK_METHOD(DartVM*, GetDartVM, (), (const, override));
157 MOCK_METHOD(bool, NotifyIdle, (fml::TimeDelta), (override));
158};
159
160class MockFontCollection : public FontCollection {
161 public:
162 MOCK_METHOD(void,
163 RegisterFonts,
164 (const std::shared_ptr<AssetManager>& asset_manager),
165 (override));
166};
167
168std::unique_ptr<PlatformMessage> MakePlatformMessage(
169 const std::string& channel,
170 const std::map<std::string, std::string>& values,
171 const fml::RefPtr<PlatformMessageResponse>& response) {
172 rapidjson::Document document;
173 auto& allocator = document.GetAllocator();
174 document.SetObject();
175
176 for (const auto& pair : values) {
177 rapidjson::Value key(pair.first.c_str(), strlen(pair.first.c_str()),
178 allocator);
179 rapidjson::Value value(pair.second.c_str(), strlen(pair.second.c_str()),
180 allocator);
181 document.AddMember(key, value, allocator);
182 }
183
184 rapidjson::StringBuffer buffer;
185 rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
186 document.Accept(writer);
187 const uint8_t* data = reinterpret_cast<const uint8_t*>(buffer.GetString());
188
189 std::unique_ptr<PlatformMessage> message = std::make_unique<PlatformMessage>(
190 channel, fml::MallocMapping::Copy(data, buffer.GetSize()), response);
191 return message;
192}
193
194class EngineTest : public testing::FixtureTest {
195 public:
196 EngineTest()
197 : thread_host_("EngineTest",
198 ThreadHost::Type::kPlatform | ThreadHost::Type::kIo |
199 ThreadHost::Type::kUi | ThreadHost::Type::kRaster),
201 "EngineTest",
202 thread_host_.platform_thread->GetTaskRunner(), // platform
203 thread_host_.raster_thread->GetTaskRunner(), // raster
204 thread_host_.ui_thread->GetTaskRunner(), // ui
205 thread_host_.io_thread->GetTaskRunner() // io
206 }) {}
207
208 void PostUITaskSync(const std::function<void()>& function) {
210 task_runners_.GetUITaskRunner()->PostTask([&] {
211 function();
212 latch.Signal();
213 });
214 latch.Wait();
215 }
216
217 protected:
218 void SetUp() override {
219 settings_ = CreateSettingsForFixture();
220 dispatcher_maker_ = [](PointerDataDispatcher::Delegate&) {
221 return nullptr;
222 };
223 }
224
225 MockDelegate delegate_;
227 ThreadHost thread_host_;
228 TaskRunners task_runners_;
229 Settings settings_;
230 std::unique_ptr<Animator> animator_;
232 std::unique_ptr<RuntimeController> runtime_controller_;
233 std::shared_ptr<fml::ConcurrentTaskRunner> image_decoder_task_runner_;
235};
236} // namespace
237
238TEST_F(EngineTest, Create) {
239 PostUITaskSync([this] {
240 auto engine = std::make_unique<Engine>(
241 /*delegate=*/delegate_,
242 /*dispatcher_maker=*/dispatcher_maker_,
243 /*image_decoder_task_runner=*/image_decoder_task_runner_,
244 /*task_runners=*/task_runners_,
245 /*settings=*/settings_,
246 /*animator=*/std::move(animator_),
247 /*io_manager=*/io_manager_,
248 /*font_collection=*/std::make_shared<FontCollection>(),
249 /*runtime_controller=*/std::move(runtime_controller_),
250 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
252 });
253}
254
255TEST_F(EngineTest, DispatchPlatformMessageUnknown) {
256 PostUITaskSync([this] {
257 MockRuntimeDelegate client;
258 auto mock_runtime_controller =
259 std::make_unique<MockRuntimeController>(client, task_runners_);
260 EXPECT_CALL(*mock_runtime_controller, IsRootIsolateRunning())
261 .WillRepeatedly(::testing::Return(false));
262 auto engine = std::make_unique<Engine>(
263 /*delegate=*/delegate_,
264 /*dispatcher_maker=*/dispatcher_maker_,
265 /*image_decoder_task_runner=*/image_decoder_task_runner_,
266 /*task_runners=*/task_runners_,
267 /*settings=*/settings_,
268 /*animator=*/std::move(animator_),
269 /*io_manager=*/io_manager_,
270 /*font_collection=*/std::make_shared<FontCollection>(),
271 /*runtime_controller=*/std::move(mock_runtime_controller),
272 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
273
275 fml::MakeRefCounted<MockResponse>();
276 std::unique_ptr<PlatformMessage> message =
277 std::make_unique<PlatformMessage>("foo", response);
278 engine->DispatchPlatformMessage(std::move(message));
279 });
280}
281
282TEST_F(EngineTest, DispatchPlatformMessageInitialRoute) {
283 PostUITaskSync([this] {
284 MockRuntimeDelegate client;
285 auto mock_runtime_controller =
286 std::make_unique<MockRuntimeController>(client, task_runners_);
287 EXPECT_CALL(*mock_runtime_controller, IsRootIsolateRunning())
288 .WillRepeatedly(::testing::Return(false));
289 auto engine = std::make_unique<Engine>(
290 /*delegate=*/delegate_,
291 /*dispatcher_maker=*/dispatcher_maker_,
292 /*image_decoder_task_runner=*/image_decoder_task_runner_,
293 /*task_runners=*/task_runners_,
294 /*settings=*/settings_,
295 /*animator=*/std::move(animator_),
296 /*io_manager=*/io_manager_,
297 /*font_collection=*/std::make_shared<FontCollection>(),
298 /*runtime_controller=*/std::move(mock_runtime_controller),
299 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
300
302 fml::MakeRefCounted<MockResponse>();
303 std::map<std::string, std::string> values{
304 {"method", "setInitialRoute"},
305 {"args", "test_initial_route"},
306 };
307 std::unique_ptr<PlatformMessage> message =
308 MakePlatformMessage("flutter/navigation", values, response);
309 engine->DispatchPlatformMessage(std::move(message));
310 EXPECT_EQ(engine->InitialRoute(), "test_initial_route");
311 });
312}
313
314TEST_F(EngineTest, DispatchPlatformMessageInitialRouteIgnored) {
315 PostUITaskSync([this] {
316 MockRuntimeDelegate client;
317 auto mock_runtime_controller =
318 std::make_unique<MockRuntimeController>(client, task_runners_);
319 EXPECT_CALL(*mock_runtime_controller, IsRootIsolateRunning())
320 .WillRepeatedly(::testing::Return(true));
321 EXPECT_CALL(*mock_runtime_controller, DispatchPlatformMessage(::testing::_))
322 .WillRepeatedly(::testing::Return(true));
323 auto engine = std::make_unique<Engine>(
324 /*delegate=*/delegate_,
325 /*dispatcher_maker=*/dispatcher_maker_,
326 /*image_decoder_task_runner=*/image_decoder_task_runner_,
327 /*task_runners=*/task_runners_,
328 /*settings=*/settings_,
329 /*animator=*/std::move(animator_),
330 /*io_manager=*/io_manager_,
331 /*font_collection=*/std::make_shared<FontCollection>(),
332 /*runtime_controller=*/std::move(mock_runtime_controller),
333 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
334
336 fml::MakeRefCounted<MockResponse>();
337 std::map<std::string, std::string> values{
338 {"method", "setInitialRoute"},
339 {"args", "test_initial_route"},
340 };
341 std::unique_ptr<PlatformMessage> message =
342 MakePlatformMessage("flutter/navigation", values, response);
343 engine->DispatchPlatformMessage(std::move(message));
344 EXPECT_EQ(engine->InitialRoute(), "");
345 });
346}
347
348TEST_F(EngineTest, SpawnSharesFontLibrary) {
349 PostUITaskSync([this] {
350 MockRuntimeDelegate client;
351 auto mock_runtime_controller =
352 std::make_unique<MockRuntimeController>(client, task_runners_);
353 auto vm_ref = DartVMRef::Create(settings_);
354 EXPECT_CALL(*mock_runtime_controller, GetDartVM())
355 .WillRepeatedly(::testing::Return(vm_ref.get()));
356 auto engine = std::make_unique<Engine>(
357 /*delegate=*/delegate_,
358 /*dispatcher_maker=*/dispatcher_maker_,
359 /*image_decoder_task_runner=*/image_decoder_task_runner_,
360 /*task_runners=*/task_runners_,
361 /*settings=*/settings_,
362 /*animator=*/std::move(animator_),
363 /*io_manager=*/io_manager_,
364 /*font_collection=*/std::make_shared<FontCollection>(),
365 /*runtime_controller=*/std::move(mock_runtime_controller),
366 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
367
368 auto spawn =
370 std::string(), io_manager_, snapshot_delegate_, nullptr);
371 EXPECT_TRUE(spawn != nullptr);
372 EXPECT_EQ(&engine->GetFontCollection(), &spawn->GetFontCollection());
373 });
374}
375
376TEST_F(EngineTest, SpawnWithCustomInitialRoute) {
377 PostUITaskSync([this] {
378 MockRuntimeDelegate client;
379 auto mock_runtime_controller =
380 std::make_unique<MockRuntimeController>(client, task_runners_);
381 auto vm_ref = DartVMRef::Create(settings_);
382 EXPECT_CALL(*mock_runtime_controller, GetDartVM())
383 .WillRepeatedly(::testing::Return(vm_ref.get()));
384 auto engine = std::make_unique<Engine>(
385 /*delegate=*/delegate_,
386 /*dispatcher_maker=*/dispatcher_maker_,
387 /*image_decoder_task_runner=*/image_decoder_task_runner_,
388 /*task_runners=*/task_runners_,
389 /*settings=*/settings_,
390 /*animator=*/std::move(animator_),
391 /*io_manager=*/io_manager_,
392 /*font_collection=*/std::make_shared<FontCollection>(),
393 /*runtime_controller=*/std::move(mock_runtime_controller),
394 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
395
396 auto spawn =
397 engine->Spawn(delegate_, dispatcher_maker_, settings_, nullptr, "/foo",
399 EXPECT_TRUE(spawn != nullptr);
400 ASSERT_EQ("/foo", spawn->InitialRoute());
401 });
402}
403
404TEST_F(EngineTest, SpawnWithCustomSettings) {
405 PostUITaskSync([this] {
406 MockRuntimeDelegate client;
407 auto mock_runtime_controller =
408 std::make_unique<MockRuntimeController>(client, task_runners_);
409 auto vm_ref = DartVMRef::Create(settings_);
410 EXPECT_CALL(*mock_runtime_controller, GetDartVM())
411 .WillRepeatedly(::testing::Return(vm_ref.get()));
412 auto engine = std::make_unique<Engine>(
413 /*delegate=*/delegate_,
414 /*dispatcher_maker=*/dispatcher_maker_,
415 /*image_decoder_task_runner=*/image_decoder_task_runner_,
416 /*task_runners=*/task_runners_,
417 /*settings=*/settings_,
418 /*animator=*/std::move(animator_),
419 /*io_manager=*/io_manager_,
420 /*font_collection=*/std::make_shared<FontCollection>(),
421 /*runtime_controller=*/std::move(mock_runtime_controller),
422 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
423
424 Settings custom_settings = settings_;
425 custom_settings.persistent_isolate_data =
426 std::make_shared<fml::DataMapping>("foo");
427 auto spawn =
428 engine->Spawn(delegate_, dispatcher_maker_, custom_settings, nullptr,
429 std::string(), io_manager_, snapshot_delegate_, nullptr);
430 EXPECT_TRUE(spawn != nullptr);
431 auto new_persistent_isolate_data =
432 const_cast<RuntimeController*>(spawn->GetRuntimeController())
433 ->GetPersistentIsolateData();
434 EXPECT_EQ(custom_settings.persistent_isolate_data->GetMapping(),
435 new_persistent_isolate_data->GetMapping());
436 EXPECT_EQ(custom_settings.persistent_isolate_data->GetSize(),
437 new_persistent_isolate_data->GetSize());
438 });
439}
440
441TEST_F(EngineTest, PassesLoadDartDeferredLibraryErrorToRuntime) {
442 PostUITaskSync([this] {
443 intptr_t error_id = 123;
444 const std::string error_message = "error message";
445 MockRuntimeDelegate client;
446 auto mock_runtime_controller =
447 std::make_unique<MockRuntimeController>(client, task_runners_);
448 EXPECT_CALL(*mock_runtime_controller, IsRootIsolateRunning())
449 .WillRepeatedly(::testing::Return(true));
450 EXPECT_CALL(*mock_runtime_controller,
451 LoadDartDeferredLibraryError(error_id, error_message, true))
452 .Times(1);
453 auto engine = std::make_unique<Engine>(
454 /*delegate=*/delegate_,
455 /*dispatcher_maker=*/dispatcher_maker_,
456 /*image_decoder_task_runner=*/image_decoder_task_runner_,
457 /*task_runners=*/task_runners_,
458 /*settings=*/settings_,
459 /*animator=*/std::move(animator_),
460 /*io_manager=*/io_manager_,
461 /*font_collection=*/std::make_shared<FontCollection>(),
462 /*runtime_controller=*/std::move(mock_runtime_controller),
463 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
464
465 engine->LoadDartDeferredLibraryError(error_id, error_message, true);
466 });
467}
468
469TEST_F(EngineTest, SpawnedEngineInheritsAssetManager) {
470 PostUITaskSync([this] {
471 MockRuntimeDelegate client;
472 auto mock_runtime_controller =
473 std::make_unique<MockRuntimeController>(client, task_runners_);
474 auto vm_ref = DartVMRef::Create(settings_);
475 EXPECT_CALL(*mock_runtime_controller, GetDartVM())
476 .WillRepeatedly(::testing::Return(vm_ref.get()));
477
478 // auto mock_font_collection = std::make_shared<MockFontCollection>();
479 // EXPECT_CALL(*mock_font_collection, RegisterFonts(::testing::_))
480 // .WillOnce(::testing::Return());
481 auto engine = std::make_unique<Engine>(
482 /*delegate=*/delegate_,
483 /*dispatcher_maker=*/dispatcher_maker_,
484 /*image_decoder_task_runner=*/image_decoder_task_runner_,
485 /*task_runners=*/task_runners_,
486 /*settings=*/settings_,
487 /*animator=*/std::move(animator_),
488 /*io_manager=*/io_manager_,
489 /*font_collection=*/std::make_shared<FontCollection>(),
490 /*runtime_controller=*/std::move(mock_runtime_controller),
491 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
492
493 EXPECT_EQ(engine->GetAssetManager(), nullptr);
494
495 auto asset_manager = std::make_shared<AssetManager>();
496 asset_manager->PushBack(std::make_unique<FontManifestAssetResolver>());
497 engine->UpdateAssetManager(asset_manager);
498 EXPECT_EQ(engine->GetAssetManager(), asset_manager);
499
500 auto spawn =
502 std::string(), io_manager_, snapshot_delegate_, nullptr);
503 EXPECT_TRUE(spawn != nullptr);
504 EXPECT_EQ(engine->GetAssetManager(), spawn->GetAssetManager());
505 });
506}
507
508TEST_F(EngineTest, UpdateAssetManagerWithEqualManagers) {
509 PostUITaskSync([this] {
510 MockRuntimeDelegate client;
511 auto mock_runtime_controller =
512 std::make_unique<MockRuntimeController>(client, task_runners_);
513 auto vm_ref = DartVMRef::Create(settings_);
514 EXPECT_CALL(*mock_runtime_controller, GetDartVM())
515 .WillRepeatedly(::testing::Return(vm_ref.get()));
516
517 auto mock_font_collection = std::make_shared<MockFontCollection>();
518 EXPECT_CALL(*mock_font_collection, RegisterFonts(::testing::_))
519 .WillOnce(::testing::Return());
520 auto engine = std::make_unique<Engine>(
521 /*delegate=*/delegate_,
522 /*dispatcher_maker=*/dispatcher_maker_,
523 /*image_decoder_task_runner=*/image_decoder_task_runner_,
524 /*task_runners=*/task_runners_,
525 /*settings=*/settings_,
526 /*animator=*/std::move(animator_),
527 /*io_manager=*/io_manager_,
528 /*font_collection=*/mock_font_collection,
529 /*runtime_controller=*/std::move(mock_runtime_controller),
530 /*gpu_disabled_switch=*/std::make_shared<fml::SyncSwitch>());
531
532 EXPECT_EQ(engine->GetAssetManager(), nullptr);
533
534 auto asset_manager = std::make_shared<AssetManager>();
535 asset_manager->PushBack(std::make_unique<FontManifestAssetResolver>());
536
537 auto asset_manager_2 = std::make_shared<AssetManager>();
538 asset_manager_2->PushBack(std::make_unique<FontManifestAssetResolver>());
539
540 EXPECT_NE(asset_manager, asset_manager_2);
541 EXPECT_TRUE(*asset_manager == *asset_manager_2);
542
543 engine->UpdateAssetManager(asset_manager);
544 EXPECT_EQ(engine->GetAssetManager(), asset_manager);
545
546 engine->UpdateAssetManager(asset_manager_2);
547 // Didn't change because they're equivalent.
548 EXPECT_EQ(engine->GetAssetManager(), asset_manager);
549 });
550}
551
552} // namespace flutter
static sk_sp< Effect > Create()
AssetResolverType
Identifies the type of AssetResolver an instance is.
static DartVMRef Create(const Settings &settings, fml::RefPtr< const DartSnapshot > vm_snapshot=nullptr, fml::RefPtr< const DartSnapshot > isolate_snapshot=nullptr)
static MallocMapping Copy(const T *begin, const T *end)
Definition mapping.h:162
size_t mapping_call_count
@ kRaster
Suitable for thread which raster data.
Definition embedder.h:264
Settings settings_
std::shared_ptr< fml::ConcurrentTaskRunner > image_decoder_task_runner_
std::unique_ptr< RuntimeController > runtime_controller_
TaskRunners task_runners_
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate_
std::unique_ptr< Animator > animator_
PointerDataDispatcherMaker dispatcher_maker_
ThreadHost thread_host_
MockDelegate delegate_
fml::WeakPtr< IOManager > io_manager_
FlutterEngine engine
Definition main.cc:68
uint8_t value
Dart_NativeFunction function
Definition fuchsia.cc:51
Win32Message message
SkFourByteTag GetType(SkReadBuffer *reader)
std::unordered_map< int32_t, SemanticsNode > SemanticsNodeUpdates
std::unordered_map< int32_t, CustomAccessibilityAction > CustomAccessibilityActionUpdates
std::function< std::unique_ptr< PointerDataDispatcher >(PointerDataDispatcher::Delegate &)> PointerDataDispatcherMaker
Signature for constructing PointerDataDispatcher.
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switches.h:41
static void DispatchPlatformMessage(JNIEnv *env, jobject jcaller, jlong shell_holder, jstring channel, jobject message, jint position, jint responseId)
bool operator==(const ViewportMetrics &a, const ViewportMetrics &b)
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 vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition switches.h:126
static void ScheduleFrame(JNIEnv *env, jobject jcaller, jlong shell_holder)
TEST_F(EngineAnimatorTest, AnimatorAcceptsMultipleRenders)
std::shared_ptr< const fml::Mapping > persistent_isolate_data
Definition settings.h:339
#define EXPECT_TRUE(handle)
Definition unit_test.h:685