When these delegate methods were initially added, it was expected that a single
shell would be able to own mutliple platform views, engines and animators. This
plan was abandoned in favor of creating multiple shells with their own platform
views, engines, etc.. The arguments were meant to ease the disambiguate the
instances of the variaous objects managed by the shell. This is no longer
necessary.
This change adds a delay before Animator::BeginFrame calls its
delegate's OnAnimatorNotifyIdle. This is because under certain
workloads, such as our parent view resizing us, which is communicated
via viewport change events, we won't have a frame scheduled yet in the
animator, despite the fact that we will go on to schedule a frame once
the viewport event arrives.
In Fuchsia's resizing performance test, on our reference high end x86-64
hardware, the previous logic was resulting in a ~45ms garbage collection
right after the first frame of an animation.
* Flush all embedded Android view on hot restart.
Adds an OnEngineRestarted method to PlatformView, this is currently only
implemented for Android where we need to use it for embedded views.
* review comments followup
* rename to OnPreEngineRestart, call before Clone
Don't emit a "VSYNC" event when running on Fuchsia, as traces on Fuchsia
are typically recorded across the whole system, causing the events to
collide with each other.
Previously the engine would load all embedded fonts listed in the app's
font manifest during startup. This change creates a Skia font manager that
is backed by the engine's AssetManager and can load embedded font assets
on demand.
* Reland "Added IsolateNameServer functionality (#5410)"
This reverts commit 1598c7ad7b830b298647c17a0c85f3648f6b737d.
* Fixed issue with isolate_name_server_test which caused test to timeout
* Disabled thread_annotations on Android as they aren't supported in the
NDK headers for std::mutex. Readded thread annotations to
IsolateNameServer.
* Added IsolateNameServer functionality, which allows for the association
of string names with isolate SendPort ids that can be used to establish
inter-isolate communications.
Eliminates support for running directly from sources or script snapshots. In
debug mode, we run from a kernel snapshot; in profile and release modes, we
link in AOT-compiled code.
Renames --dart-non-checked-mode to --disable-dart-asserts since checked mode
does not make sense in Dart 2.
Adds --dynamic and --interpreter flags to
tools/gn. These flags result in engines with
properties as follows:
--dynamic:
- JIT targeting native code on Android and
DBC on iOS
--interpreter
- Target DBC even if running on Android.
For example:
gn --android --dynamic --interpreter --runtime-mode release
Will generate an engine:
- Without Dart asserts
- Without Observatory
- With JIT compililation to DBC
into out/android_dynamic_release_dbc
Flutter AOT builds can be done on Android using .so files (instead of
separate instruction/data snapshots) using the `--build-shared-library`
flag.
Running from .so files stopped working after the engine refactoring in
82c5c8feda, which this CL restores.
Issue https://github.com/flutter/flutter/issues/17236
This causes Skia to fall back to the ES2 shading language when the GL
driver doesn't clearly communicate that it supports the ES3 external
image extension. Doing so ensures that video playback (which relies on
external images) works on many more devices.
iOS does not allow usage of OpenGL ES APIs when the app has been moved to the
background. With this change, the shell will wait until pending IO thread tasks
complete and the Skia unref queue is drained before proceeding with shutdown.
See https://github.com/flutter/flutter/issues/17511