1238 Commits

Author SHA1 Message Date
Chinmay Garde
dfaa1c9292 Only allow mappings for ICU initialization. (flutter/engine#8656)
If the mapping callback is not set or it the callback returns invalid data, ICU initialization will be embedder responsibility.

This affects all embedders and the following have been audited:
* Android: Via a symbol mapping.
* iOS: Via a file mapping.
* Embedder: Via a file mapping.
* Fuchsia: Via a VMO mapping
* Test shells and Flutter tester: Via file mapping with ICU data needing to be next to the executable.
2019-04-19 15:01:40 -07:00
Chinmay Garde
7758ff9f51 Cleanup references to FLX archives from the engine. (flutter/engine#8653) 2019-04-19 12:49:07 -07:00
Chinmay Garde
1133591eeb Add factory methods to FileMapping that make it easy to create common mappings. (flutter/engine#8652)
The GetMapping calls removed in this patch had the same code and had to be repeated across different test harnesses as well as in dart_snapshot.cc. Just make this a factory method so the code is less verbose.
2019-04-19 12:48:53 -07:00
Ben Konyi
ef2a551576 Disable auth codes for Observatory test (flutter/engine#8646) 2019-04-18 17:46:32 -07:00
Ben Konyi
d6b169c641 Enable VM service authentication codes by default (flutter/engine#8594) 2019-04-18 14:17:25 -07:00
Ben Konyi
d78a466267 Add support for authentication codes via MDNS on iOS (flutter/engine#8625) 2019-04-18 12:12:29 -07:00
Chinmay Garde
12410da5f7 Avoid leaking the VM in the shell unittests and assert VM state in existing tests. (flutter/engine#8628) 2019-04-18 11:32:33 -07:00
Shi-Hao Hong
1ead577b35 Fix typo in comment (flutter/engine#8617) 2019-04-17 15:03:50 -07:00
liyuqian
27e4dac06b Rename flow namespace to flutter (flutter/engine#8615)
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
2019-04-17 14:38:45 -07:00
stuartmorgan
1fd410c44f Add FLEPluginRegistry for macOS (flutter/engine#8611)
Creates a minimal FLEPluginRegistry protocol, which is a subset of the
FlutterPluginRegistry.

This is a small step toward eventually merging the APIs, but allows
changing the example project structure to better reflect what a future
template will look like.
2019-04-17 10:53:59 -07:00
Michael Klimushyn
5df695efdf Pipe Z bounds from ViewportMetrics to Flow (flutter/engine#8583)
This is the first step in making Flutter aware of and responsive to Z
bound overflow. On its own this patch shouldn't result in any changes in
behavior. This will need to be followed up with a patch in Fuchsia's
Flutter runner to set the Z bounds after this lands, and another patch
in the engine actually implementing the desired overflow behavior.

This Z bound info is routed through the engine itself to make sure the
bounds in flow are truly consistent from the Fuchsia runner. However
these values should eventually be exposed to the framework as well.
2019-04-17 09:56:46 -07:00
stuartmorgan
e722bba483 Add desktop shell unittests to test script (flutter/engine#8600)
Builds the unit test on all platforms, and adds them to the aggregate test script.
2019-04-16 22:37:39 -07:00
stuartmorgan
922d6df36f Implement StandardMethodCodec for C++ shells (flutter/engine#8598)
Adds StandardMethodCodec support to the C++ client wrapper. This makes it
substantially easier to add Windows and Linux support for existing plugins, as
StandardMethodCodec is the default plugin protocol.

Fixes flutter/flutter#30670

Does not include extensibility for the codec, which will be added later.
2019-04-16 19:49:09 -07:00
stuartmorgan
9b2819a3bb Variant type for C++ client wrapper (flutter/engine#8592)
Adds a type that can hold any of the types corresponding to the Dart types
that are supported by the standard message channel codec. This provides
the foundation for adding standard message codec support for the C++
desktop shells (flutter/flutter#30670).
2019-04-16 16:33:07 -07:00
Qxyat
500f19660d Composite Embedded Views with the correct GrContext
PaintRecorder Canvases are not associated with GrContexts.
2019-04-16 14:13:34 -07:00
Chris Bracken
e7bd1767be Add null check in FLETextInputPlugin (flutter/engine#8538)
Adds a guard on `_activeClientID` in `insertNewline:`. The conditional
around the `insertText:replacementRange:` call already catches this, but
we then unconditionally pack `_activeClientID` into an `NSArray`, which
disallows nil.
2019-04-12 21:10:23 -07:00
Kaushik Iska
f9648fe057 Revert Versions API (flutter/engine#7828)
* Revert "Fix versions implementation (#7726)"

This reverts commit 82b3db052387161a8eed5f98f08080f1a60b7dfb.

* Revert "Expose the Flutter engine, Dart and Skia versions to Dart. (#7634)"

This reverts commit ec6f6c35b36548a2cf745c0a4b3cb8e5b6ee0e72.

* remove namespace shell stuff

* fix format

* fix licenses
2019-04-12 14:23:13 -07:00
Matt Carroll
8b4adba352 Android Embedding PR29: Improve FlutterFragment construction API + engine config API. (flutter/engine#8540) 2019-04-12 13:19:05 -07:00
Chris Bracken
e4cca1bd56 Remove unused import in FlutterActivityDelegate (flutter/engine#8563)
android.app.UiModeManager is unused in FlutterActivityDelegate.
2019-04-12 11:17:57 -07:00
Diego Ballesteros Villamizar
9d9892d005 Add missing <memory> include to text_input_model.h (flutter/engine#8562)
text_input_model.h uses std::unique_ptr but does not include the memory header.
2019-04-12 10:48:11 -07:00
stuartmorgan
6956c8a88c Export extern constants in embedder.h (flutter/engine#8550)
PR #8498 made these constants extern, but forgot to export them so they
would be public symbols.
2019-04-11 23:32:29 -07:00
Matt Carroll
4b8ea49e58 Android Embedding PR30: Make FlutterView focusable so that the keyboard can interact with it. (flutter/engine#8551) 2019-04-11 13:50:42 -07:00
Chris Bracken
d467c50378 Correct nullability for FlutterStandardReader (flutter/engine#8537)
FlutterStandardReader's `readValueOfType:` method returns nil when
called with `FlutterStandardFieldNil`. By extension, `readValue` can
also return nil values.
2019-04-11 09:59:08 -07:00
Matt Carroll
0e05ad325d Android Embedding PR28: Report app is active to Flutter in FlutterFragment.onResume() instead of onPostResume() forwarded from Activity. (flutter/engine#8536) 2019-04-10 17:47:56 -07:00
Matt Carroll
b3e91cb003 Use code cache dir for engine cache on API >= 21 (#14704). (flutter/engine#8534) 2019-04-10 15:32:31 -07:00
stuartmorgan
05de762638 Add an option to build the GLFW shell on macOS (flutter/engine#8531)
Since the GLFW shell is likely to continue to exist in at least the
medium term, it is useful for maintenance to be able to build and use it
on any desktop platform.

Includes a buildroot roll to pick up the macOS build suppport for
third_party/glfw.
2019-04-10 15:18:34 -07:00
Ben Konyi
c1a253633c Added support for authentication codes for the VM service (flutter/engine#8527) 2019-04-10 14:38:58 -07:00
stuartmorgan
93b8033015 Move constant definitions out embedder.h (flutter/engine#8498) 2019-04-10 10:03:10 -07:00
Chinmay Garde
2b4e6ce82b Merge flutter/synchronization contents into fml. (flutter/engine#8525)
When flutter/synchronization was first authored, we did not own fml (it was called fxl then). Now we do, so use a single spot for such utilities. The pipeline was meant to be a general purpose utility that was only ever used by the animator (it even has animator specific tracing), so move that to shell instead (where the animator resides).
2019-04-09 19:18:51 -07:00
Chinmay Garde
72111314cb Remove redundant specification of the |flutter| namespace in the engine. (flutter/engine#8523) 2019-04-09 17:50:06 -07:00
Chinmay Garde
4dd267959f Rename the shell namespace to flutter. (flutter/engine#8520) 2019-04-09 17:10:46 -07:00
Matt Carroll
1131442152 Android Embedding PR27: Fix SurfaceView flicker in Fragment transactions (flutter/engine#8504) 2019-04-09 13:45:25 -07:00
Chinmay Garde
e1622af4b5 Remove the unused EnableBlink flag. (flutter/engine#8518)
This used to be when we had two text shaping engines.
2019-04-09 13:26:48 -07:00
Chinmay Garde
1fd28a143a Rename the blink namespace to flutter. (flutter/engine#8517)
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
2019-04-09 12:44:42 -07:00
nathanrogersgoogle
fec21fa394 Route FlutterEventTracer events to Fuchsia tracing for Fuchsia (flutter/engine#8499)
When running on Fuchsia, "fml/trace_event.h" sends trace events towards
Fuchsia's tracing system, rather than its own |fml::tracing::*| one.  Do
the same thing for |FlutterEventTracer|, in order to unlock category
"skia" trace events when running on Fuchsia.

The reason this was not working before is because |FlutterEventTracer|
was directly using |fml::tracing::*| functions, rather than the
TRACE_EVENT_* macros.

In the future, we can look into having the skia event tracer enabled by
default on Fuchsia, controlling the presence of Skia events by
enabling/disabling the "skia" category, once we measure the performance
cost of doing so.
2019-04-08 22:54:06 -04:00
Chinmay Garde
7e10548a2e Wire up support for Dart fixtures in shell_unittests. (flutter/engine#8497) 2019-04-08 15:36:07 -07:00
Matt Carroll
fbf51888c6 Android Embedding PR26: Offer an async version of FlutterMain's ensure initialization complete. (flutter/engine#8465) 2019-04-08 14:46:41 -07:00
KyleWong
c7754e142b Refactor ios play input sound logic. (flutter/engine#7783)
As there are extra requirement to use playInputClick in iOS, use AudioServicesPlaySystemSound instead to play input sound.
2019-04-08 11:31:23 -07:00
Alan Doubleday
b07ae25f0a Support ContextWrapper when FlutterView is instantiated within a Fragment. (flutter/engine#7776) 2019-04-08 10:30:36 -07:00
Matt Carroll
d2c9597a7f Android Embedding PR25: Prevent black rectangle when launching FlutterActivity (flutter/engine#8460) 2019-04-05 15:59:12 -07:00
Chinmay Garde
b330816fdd Log the correct function on error in the embedder. (flutter/engine#8461) 2019-04-05 15:16:07 -07:00
Chinmay Garde
19d5a39d24 Enable shutting down all root isolates in a VM. (flutter/engine#8457)
This reverts commit 9cd2e8351c47b7a78c1005341f4b5e1a2f125695.
2019-04-05 13:34:40 -07:00
Matt Carroll
7f4451fbbe Android Embedding PR24: Allow FlutterActivity to provide an engine, also adjust FlutterFragment timing to avoid Activity launch lag. (flutter/engine#8448) 2019-04-05 13:04:17 -07:00
xster
6815c85282 Make sure FlutterViewController flushs all pending touches when no longer active (flutter/engine#8400) 2019-04-04 16:22:37 -07:00
stuartmorgan
783b5003c0 Add window title/icon support to GLFW shell (flutter/engine#8435)
The GLFW shell used a hard-coded title and default icon for the window,
but these are things that a client should be able to control.
2019-04-04 13:54:07 -04:00
Chinmay Garde
9cd2e8351c Revert "Enable shutting down all root isolates in a VM. (#8402)" (flutter/engine#8431)
This reverts commit 56252a8aacaf29a17853e3ade6978972689dff18.
2019-04-03 17:08:56 -07:00
Chinmay Garde
56252a8aac Enable shutting down all root isolates in a VM. (flutter/engine#8402) 2019-04-03 15:44:29 -07:00
Chris Bracken
e3beb1ce56 Make AccessibilityViewEmbedder final (flutter/engine#8429)
Since this class implements equals() and hashCode() it should either be
final or handle subclasses in equals(); given this is unlikely to be
subclassed, making it final is the simpler option.
2019-04-03 15:06:11 -07:00
Chris Bracken
df39681b8c Eliminate unused displayBounds parameter (flutter/engine#8427)
Use of this parameter was eliminated in 2f36f15.
2019-04-03 14:28:29 -07:00
Chinmay Garde
736277e9c7 Revert "Revert "Separate the data required to bootstrap the VM into its own class. (#8397)" (#8406)" (flutter/engine#8414)
This reverts commit 8a0076fdddc96b4ec2fb67f45051aa490827fc02.
2019-04-03 13:38:12 -07:00