The FLX will contain a font manifest JSON file that maps font family names
to custom font assets. Flutter will provide a FontSelector that loads
fonts on demand and caches typeface and style data.
Currently, during application startup we:
* copy the FLX file to a Mojo pipe
* write the Mojo pipe contents back to a temporary file on disk
* unzip the FLX contents into cache storage
This contributes to startup latency and requires that we later clean up the
cache.
With this change, the assets will be extracted from the FLX archive
on demand with no writes to storage. Runtime cost should be minimal
given that most assets (except for the snapshot) are not compressed
in the archive.
This is another step towards enabling accessibility for Flutter on
Android. It exposes the semantics tree to Android's accessibility API
when accessibility is enabled.
It does not yet:
- allow one to actually interact with the application via the
accessibility API
- expose the accessibility tree to touch exploration
- implement the accessibility focus API
However, you can see the tree if you run uiautomatorviewer. It is there,
and it matches the UI. At least in Stocks. I didn't test anything else.
When the engine starts a new version of the Dart application, the animator may
have pending callbacks and other state related to the previous run of the app.
This state must be cleared before the new vsync provider is assigned.
Now that we understand window insets, we don't need to hard-code the size of
the status bar. Also, convert the viewport metrics to be consistently in
physical pixels.
We used to share memory between Dart strings and WTF::String objects by
way of the Dart externalized strings. That used to be important when the
DOM shared many strings between C++ and Dart. However, now that we don't
retain strings in C++ much anymore, we don't need this complexity.
This patch removes DartStringCache and the integration. It also unwinds
several cases where we were converting back and forth between
WTF::String and std::string for no reason. Now we use std::string more
consistently.
For the case of ParagraphBuilder::addText, we now take a raw const
char*, which more closely matches the API the DartVM exposes. That means
we do a single copy out of the VM and into the render tree at that
point.
This complex machinery made sense for Blink, which has hundreds of
developers. In our case, we're just moving around two bools. We can do
that in a much simpler way.
We now respect the "route" field in Intents to load a route other than '/'.
Also, use popRoute rather than events to indicate that the framework has asked
us to go back.
If we let services_provided_to_embedder close, we'll trigger a bug in Dart's
ApplicationConnection framework code. I've filed
https://github.com/domokit/mojo/issues/536 and will fix that separately. This
patch works around the issue for now.
Now the control flow for wiring up platform services starts in the
platform-specific code. Previously we started in shared code, which was
imposing constraints on the startup sequence for all platforms. Now that we
start in platform-specific code, we'll be able to add better support for Mojo
in a future patch.