95 Commits

Author SHA1 Message Date
Hixie
121fe0df40 Fix startup crash caused by mojo roll. 2016-03-03 09:29:33 -08:00
Adam Barth
95b5d5dfa8 Update uses of Mojo to new interfaces 2016-03-02 14:14:55 -08:00
Jason Simmons
41f93f4099 Rename DOMDartState to UIDartState 2016-03-02 10:47:30 -08:00
Jason Simmons
0ede7dded8 Implement support for invoking Mojo services from secondary isolates 2016-02-29 16:20:27 -08:00
Chinmay Garde
f9281a1edf Allow specification of the FLX bundle (containing no Dart snapshot) outside the iOS/Mac application bundle.
Allows launching of apps without having any Xcodebuild step in the simulator.
2016-02-29 13:16:01 -08:00
Jason Simmons
470118b0de Support spawning new Dart isolates from within a Flutter app 2016-02-24 14:59:59 -08:00
Eric Seidel
f94ca77317 Add explicit destructor to appease clang plugin
@jason-simmons
2016-02-19 11:03:12 -08:00
Jason Simmons
6d9419a3e7 Fix iOS build 2016-02-19 10:56:25 -08:00
Jason Simmons
0b8038fa1e Support loading of custom fonts
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.
2016-02-17 12:07:22 -08:00
Adam Barth
9dae74e97b Remove dart:ui_internals
This patch merges these functions into dart:ui, which is simpler.

Fixes #83
2016-02-12 22:44:20 -08:00
Jason Simmons
f4542c9152 Use Engine::RunFromBundle and the ZipAssetBundle on all platforms 2016-02-12 11:50:00 -08:00
Jason Simmons
ae517c2fee Add a way to override the snapshot when running an FLX bundle 2016-02-09 10:08:26 -08:00
Jason Simmons
97e65a4571 Serve the asset bundle directly out of an FLX zip file
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.
2016-02-05 14:38:42 -08:00
Hixie
adbb587ab1 Flutter<->Android accessibility bridge
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.
2016-02-04 09:15:07 -08:00
Adam Barth
aec7d422e7 Pass the Mozart ViewHost into Dart
Dart needs access to the ViewHost in order to create child views.
2016-02-03 14:39:45 -08:00
Jason Simmons
3407ce1fb9 Reset all animator state when restarting a paused animator
Fixes #1499
2016-02-01 13:05:54 -08:00
Jason Simmons
bb50a35434 Reset the animator before assigning a new vsync provider
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.
2016-01-28 16:41:12 -08:00
Adam Barth
411c6bfa4b Port flutter.mojo to Mozart
Everything should work except the keyboard.
2016-01-28 16:04:19 -08:00
Adam Barth
e22e75ea50 Merge pull request #2302 from abarth/rm_scoped_ptr
Remove almost all uses of base::scoped_ptr
2016-01-27 08:38:41 -08:00
Adam Barth
142c5dc5ec Remove almost all uses of base::scoped_ptr
We now use std::unique_ptr more consistently.
2016-01-27 01:05:47 -08:00
Adam Barth
c3a78a1796 Remove dependencies on ui/gfx/geometry
We have enough geometry classes kicking around. We don't need the
ui/gfx/geometry types too.
2016-01-26 23:57:20 -08:00
Adam Barth
33d7553e39 Improve handling of window insets on Android
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.
2016-01-21 11:24:17 -08:00
Adam Barth
0140555b54 Remove integration between tonic and WTFString
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.
2016-01-18 20:47:46 -08:00
Adam Barth
0b629d419f Move //sky/compositor to //flow
Now that the compositor doesn't have any tricky deps, we can make it a
top-level project, which saves a bunch of typing.
2016-01-12 22:39:51 -08:00
Adam Barth
bec6ad5d3f Merge pull request #2178 from floitschG/handleRealTime
Add 'HandleRealTimeEvents' to window.
2016-01-12 12:25:13 -08:00
Adam Barth
b4377c93dd Remove RuntimeEnabledFeatures
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.
2015-12-29 22:27:18 -08:00
Jason Simmons
e55cf62694 Provide callbacks for activity pause and resume events 2015-12-15 18:01:36 -08:00
Florian Loitsch
8e1fc82146 Add 'FlushRealTimeEvents' to window. 2015-12-11 16:11:47 -08:00
Jason Simmons
98427a2763 Tell Flutter about the host platform's locale 2015-12-07 14:27:22 -08:00
Chinmay Garde
ee55c83609 Add startup trace events 2015-12-04 14:40:12 -08:00
George Kulakowski
a371cceee1 Make RequestFrame less janky in the no vsync case
Instead of spamming the MessageLoop, guess that 16ms is a good amount of
time to wait
2015-12-03 14:36:00 -08:00
Chinmay Garde
0bc34f0394 Allow tracing during startup 2015-12-03 11:01:45 -08:00
Florian Loitsch
5fa49e11ad Merge pull request #2121 from floitschG/raster_pipe
Make rasterizer a mojo service.
2015-12-02 16:32:45 -08:00
Florian Loitsch
372355ad22 Make rasterizer a mojo service. 2015-12-02 16:28:39 -08:00
Eric Seidel
a92597ee07 Add various trace events for tracing startup
@abarth
2015-12-02 12:18:20 -08:00
Chinmay Garde
34696334a4 Allow capturing unified (Dart and base) traces from observatory
* Start capturing via <obs_host>:<obs_port>/flutter_startTracing
* Stop capturing via <obs_host>:<obs_port>/flutter_stopTracing
2015-12-01 13:26:53 -08:00
Adam Barth
68dfad8e92 Add --flx flag to load FLX files
Also, remove the --snapshot flag because using FLX files is the path we're
paving.
2015-11-27 23:14:07 -08:00
Adam Barth
97a375f096 Flutter for Modroid should use vsync
This patch teaches Flutter how to connect to the vsync service on Modroid.
Also, remove our now-redunant copy of vsync.mojom.

Fixes #589
2015-11-25 13:10:44 -08:00
Adam Barth
a9db805f58 Add system-level routing
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.
2015-11-24 12:40:41 -08:00
Adam Barth
db2c9d43ce Remove sky_viewer.mojo
We now use flutter.mojo instead.
2015-11-17 14:32:57 -08:00
Adam Barth
ae58ba7c8c Bring sky_shell.mojo up to feature parity with sky_viewer.mojo
I believe this patch implements all the remaining features from
sky_viewer.mojo.
2015-11-16 17:19:35 -08:00
Adam Barth
36b4f0669c Make sky_shell.mojo work on Android
There's no vsync service in MojoShell, so we shouldn't try to connect to it.
Feature request for MojoShell is in https://github.com/domokit/mojo/issues/535.
2015-11-16 15:27:28 -08:00
Collin Jackson
794caa2314 Merge pull request #2059 from collinjackson/rename_flutter_strings
Fix #371 Replace “chromium” and “sky” with “flutter” in logs and Mac Shell UI
2015-11-16 14:54:30 -08:00
Collin Jackson
0904164fd6 Fix https://github.com/flutter/flutter/issues/371 renaming "sky" and "chromium" to "flutter" in logs and Mac Shell UI 2015-11-16 14:54:18 -08:00
Adam Barth
ba603acc04 Fix build and rename a variable
I was supposed to rename this variable before landing the previous patch.
2015-11-16 14:42:44 -08:00
Adam Barth
6fae1a6bd4 Hold services_provided_to_embedder open
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.
2015-11-16 13:57:17 -08:00
Adam Barth
77f873c1a4 Wire in Mojo services to sky_shell.mojo
After this patch, code running in sky_shell.mojo has access to Mojo services.
2015-11-16 12:56:08 -08:00
Adam Barth
9dc71cb51f Refactor how we wire up platform services
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.
2015-11-16 12:24:28 -08:00
Adam Barth
3082e82586 Merge pull request #2054 from abarth/rm_network
Remove sky:🐚:Engine's dependency on network_service
2015-11-16 09:50:23 -08:00
Adam Barth
33a1cd3e87 Remove sky:🐚:Engine's dependency on network_service
We weren't using the network service for anything.
2015-11-16 09:22:06 -08:00