Previously PlatformViewAndroid would create a pipe and hand it off to the
SkyEngine, which would give it to the isolate's DartState. If a second
isolate is created, the SkyEngine would no longer hold a valid proxy to a
ServicesProvider, and the new isolate's Dart code can not obtain the
servicesProvidedByEmbedder.
SkyApplication now reads service info from a services.json file bundled
with the apk. For each service, it registers a method that invokes
connectToService on a named class. This way, third party services can
register themselves.
There's a corresponding change to flutter_tools to generate this
services.json when building an apk that depends on services.
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.
Now we just depend on Skia and Base, which makes the compositor easier
to understand.
Also, update our skia/ext/refptr.h to match the current version of the
code in Chromium. This version adds support for several useful C++11
patterns.
Reading the Android docs, it sounds like an android.view.View can re-attach to
the window after detaching. Previously, we destroyed the engine when we
detached from the window. Now we wait for the activity to be destroyed.
Hopefully fixes#997
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.