After this patch, Flutter apps on Fuchsia can access their asset
bundles. Unlike other platforms, the asset bundles are stored in memory
rather than in the file system.
This patch abstracts where the content of the zip file is stored.
Currently, zip files are stored in the file system, but in Fuchsia,
we're going to store them in memory (at least for the time being).
Rather than represent a zip file as a path in the file system, we
instead use an UnzipperProvider, which can create zip::UniqueUnzipper
objects on demand.
* Move all private config information from skia_config to skia_library_config. This was causing most skia specific defines to be applied to all targets that depended on Skia. These defines were only used by the Skia implementation. Makes the command line invocation for our sources smaller and less confusing.
* Removes defines not present in the current Skia sources.
* Dont add both directories containing SkUserConfig.h from ext and the Skia sources. Depending on the order in which the config directory was specified on the command line, the sources would use a different config.
In older versions of Skia, there were two files named SkFontMgr_fontconfig.cpp.
We want to use the one that contains SkFontMgr_FCI. That file was renamed
to SkFontMgr_FontConfigInterface.cpp
This caused the assert in https://github.com/flutter/flutter/issues/5694
We could get into a situation where the second time we rasterize a picture for an SKP, the raster cache detects that the same picture is being repeated in subsequent onscreen frames and then proceeds to rasterize the contents to an offscreen texture. This not only causes an unnecessary cache entry, but also shows the cached image in the final SKP trace (which is not what was originally displayed on screen).
runtime/BUILD.gn and ..core/BUILD.gn use flutter_runtime_mode which
is defined in common.gni. If the build comes through common/BUILD.gn
this is imported (implicity) but builds that depend on specific
files, like the Fuchsia build, won't have this imported. This
imports the gni from the build files that use it instead of relying
on it already being there.
* Add config properties to specify snapshot blob file names.
This adds the ability of the shell to override the default
dart aot snapshot blob file names, and it wires up Android's
FlutterMain to recognize the properties in the app's manifest.
This will be used for flutter applications that build their
binary snapshots into files other than the default ones
that the engine uses.
We don't yet have support for text on Fuchsia. This patch add stub
implementations of Paragraph and ParagraphBuilder so that Flutter apps
that use text don't error out. Instead, the text is 0x0 and invisible.
Also, teach MojoServices not to crash if it hasn't been created by the
time Dart tries to use it.
After this patch, we're able to run spinning_square on Fuchsia. I've
left some TODO comments about some shortcuts I've taken that we'll need
to improve in the future.
This patch should contain all the code we need to run Flutter on
Fuchsia's software framebuffer (without text). I haven't actually tried
running the code, so I'm sure it doesn't work yet.
Also, rename SkyViewClient to RuntimeDelegate. These names are more
sensible.
This patch also cleans up the RuntimeDelegate a bit, for example by
removing support for flushing real-time events, which aren't used.