1546 Commits

Author SHA1 Message Date
Francisco Magdaleno
ef32890466
Send flag modified events to the framework (#13269) 2019-10-22 19:01:00 -07:00
Chinmay Garde
b5a33d4d6a
Allow embedders to update preferrred locales. (#13238)
This was previously only possible by sending an undocumented payload over an engine managed channel.
2019-10-22 17:50:01 -07:00
Chinmay Garde
97f5ad4a90
Avoid accessing the Cocoa view on the GPU or IO task runners. (#13295)
The view was being accessed from a background thread so its OpenGL context could be accessed. This tripped thread safety assertions in Cocoa. Now the OpenGL context is stashed in the FlutterEngine instance itself.
2019-10-22 14:21:49 -07:00
Ryan Macnak
f6900001eb
Roll Dart to 6a65ea9cad4b014f88d2f1be1b321db493725a1c. (#13294)
Remove dead shared snapshot arguments to Dart_CreateIsolateGroup.

6a65ea9cad4b [vm] Remove shared snapshot and reused instructions features.
db8370e36147 [gardening] Fix frontend-server dartdevc windows test.
4601bd7bffea Modified supertype check error message to be more descriptive.
0449905e2de6 [CFE] Add a serialization-and-unserialization step to strong test
c8b903c2f94f Update CHANGELOG.md
2a12a13d9684 [Test] Skips emit_aot_size_info_flag_test on crossword.
b26127fe01a5 [cfe] Add reachability test skeleton
2019-10-22 13:14:20 -07:00
Jason Simmons
f0c9edcfa5
Do not request executable permission on Fuchsia file mappings unless it is required (#13290)
Fixes https://github.com/flutter/flutter/issues/43273
2019-10-22 11:24:51 -07:00
Matt Carroll
e6e35a90df
Forwards Activity result to FlutterFragment in FlutterFragmentActivity. (#13214) 2019-10-21 17:05:46 -07:00
Jonah Williams
6ab23d37d5
fix NPE in accessibility bridge (#13255) 2019-10-21 15:35:34 -07:00
Kaushik Iska
84a3365dcf
Add templates to generate fuchsia host bundles (#13158)
This is part of an effort to separate generation of
host artifacts and target artifacts for fuchsia. The
`fuchsia_host_bundle` template aims to capture all the
artifacts that are specific to a given host.

The next step would be to bundle these are separate CIPD
packages for mac and linux (only x64 hosts)

internal planning doc: go/flutter-fuchsia-packaging
2019-10-21 12:51:38 -07:00
Matt Carroll
ee91881ccc
Adds Dark Mode support to new Android embedding (this was accidentally missed previously). (#13215) 2019-10-18 12:46:09 -07:00
Jacek Fedoryński
748b64049c Add repeatCount to FlutterKeyEvent (#13176)
Adds repeatCount field to KeyEventChannel.FlutterKeyEvent. We set it
to the value returned by KeyEvent.getRepeatCount() and add it to the
message passed through the channel with the intention of exposing it
in RawKeyEventDataAndroid on the framework side.

flutter/flutter#42855
2019-10-18 10:39:19 -07:00
Chinmay Garde
c57ffbf0ec
Specify a human readable reason for an error from the embedder API. (#13218)
Fixes https://github.com/flutter/flutter/issues/42480
2019-10-17 17:29:37 -07:00
Chinmay Garde
c92613bc49
Re-land "Custom compositor layers must take into account the device pixel ratio."
This reverts commit 6c2381da6070f9e96825841e77e9ffeb376d6aa9 and applies iOS fixes.
2019-10-17 14:07:51 -07:00
Chinmay Garde
6a1988647f
Add trace events around custom compositor callbacks. (#13212) 2019-10-17 14:07:11 -07:00
Chinmay Garde
6c2381da60
Revert "Custom compositor layers must take into account the device pixel ratio. (#13193)" (#13211)
This reverts commit e53d10c3456ccac1bffabc78a16fd6ce680d0074.
2019-10-17 12:59:27 -07:00
Chinmay Garde
e53d10c345
Custom compositor layers must take into account the device pixel ratio. (#13193)
The contents rendered into the backing stores are already correctly scaled.
The initial implementation assumed this also held true for the metrics obtained
via embedded view parameters.

Fixes b/142699417
2019-10-17 12:04:13 -07:00
stuartmorgan
508146f0de
Add a task runner for the Win32 embedding (#13043)
Adds a task runner, and exposes API to allow application-level runloops to know when they need to next call the API to process engine events. Internally, sends null events to wake up the app runloop when new events are scheduled to ensure the wait time is updated accordingly.

Fixes #36420
2019-10-16 21:30:06 -07:00
Chinmay Garde
a925df1898
Remove incomplete static thread safety annotations. (#13151)
Fixes https://github.com/flutter/flutter/issues/42704.
2019-10-16 17:28:31 -07:00
Jason Simmons
72420a3ba5
Remove redundant call to updateEditingState in sendKeyEvent (#13175)
See https://github.com/flutter/flutter/issues/41005
2019-10-16 15:53:12 -07:00
Chinmay Garde
53900d5189
Revert "Issue 13238: on iOS, force an orientation change when the current orientation is not allowed" (#13160)
This reverts commit c38ed2ca1c8af167383fe5732539e281d41e9128.
2019-10-15 17:24:49 -07:00
Josh
c38ed2ca1c Issue 13238: on iOS, force an orientation change when the current orientation is not allowed (#12295) 2019-10-15 14:36:59 -07:00
Chinmay Garde
bf81971f7a
Allow embedders to specify a render task runner description. (#13124)
Embedders may use this to specify a thread whose event loop is managed by them
instead of the engine. In addition, specifying the same task runner for both
the platform and render task runners allows embedders to effectively perform
GPU rendering operations on the platform thread.

To affect this change, the following non breaking changes to the API have been
made:

* The `FlutterCustomTaskRunners` struct now has a new field `render_task_runner`
  for the specification of a custom render task runner.
* The `FlutterTaskRunnerDescription` has a new field `identifier`. Embedders
  must supply a unique identifier for each task runner they specify. In
  addition, when describing multiple task runners that run their tasks on the
  same thread, their identifiers must match.
* The embedder may need to process tasks during `FlutterEngineRun` and
  `FlutterEngineShutdown`. However, the embedder doesn't have the Flutter engine
  handle before `FlutterEngineRun` and is supposed to relinquish handle right
  before `FlutterEngineShutdown`. Since the embedder needs the Flutter engine
  handle to service tasks on other threads while these calls are underway,
  there exist opportunities for deadlock. To work around this scenario, three
  new calls have been added that allow more deliberate management of the Flutter
  engine instance.
  * `FlutterEngineRun` can be replaced with `FlutterEngineInitialize` and
    `FlutterEngineRunInitialized`. The embedder can obtain a handle to the
    engine after the first call but the engine will not post any tasks to custom
    task runners specified by the embedder till the
    `FlutterEngineRunInitialized` call. Embedders can guard the Flutter engine
    handle behind a mutex for safe task runner interop.
  * `FlutterEngineShutdown` can be preceded by the `FlutterEngineDeinitialize`
    call. After this call the Flutter engine will no longer post tasks onto
    embedder managed task runners. It is still embedder responsibility to
    collect the Flutter engine handle via `FlutterEngineShutdown`.
* To maintain backwards compatibility with the old APIs, `FlutterEngineRun` is
  now just a convenience for `FlutterEngineInitialize` and
  `FlutterEngineRunInitilaized`. `FlutterEngineShutdown` now implicitly calls
  `FlutterEngineDeinitialize` as well. This allows existing users who don't care
  are custom task runner interop to keep using the old APIs.
* Adds complete test coverage for both old and new paths.

Fixes https://github.com/flutter/flutter/issues/42460
Prerequisite for https://github.com/flutter/flutter/issues/17579
2019-10-15 14:26:31 -07:00
Kaushik Iska
c482ff686e
Add flutter_tester binary to the CIPD package (#13143)
- Also unifies f/s/platorm/fuchsia:fuchsia as the only target we build.
- This should contain all the packages we need to build fuchsia.
2019-10-15 12:26:13 -07:00
Andy Weiss
81110bb8ec Support empty strings and vectors in standard codec (#12974)
* Support empty strings and vectors in standard codec

Fixes #41993

Currently an empty string or vector will call through to WriteBytes
which asserts that the number of bytes it is being asked to write is
strictly positive. Instead we should not call WriteBytes if the length
is zero.

Similarly, when we read, we don't need to call out if the length is
zero.

* fix typo in test name

* remove unnecessary length check in ReadValue for List

* we also don't need this check before calling read as memcpy can handle size 0
2019-10-15 08:35:50 -07:00
Erick (CptBlackPixel)
49a8e451b8 Adding deviceId to KeyEventChannel enconding method (#12958)
This Pull Request simple adds the deviceId property to the encoding method, I am preparing a next PR on the flutter repository that reads this info and add a property to RawKeyEventDataAndroid on the Flutter side.

This is necessary so we can support multiple gamepads on Android, in order to be possible to make a local multiplayer game with Flutter.
2019-10-14 17:47:15 -07:00
Michael Klimushyn
531a9cfb8e
Fire PlatformViewController FlutterView callbacks (#13015)
Fixes a bug where `PlatformViewController` was not being notified of `FlutterView` attachment changes.
2019-10-14 14:03:25 -07:00
gaaclarke
e3742a9b77
iOS Platform View: Fixed overrelease of the observer. (#13093) 2019-10-14 13:49:02 -07:00
Kaushik Iska
7a06baaddf
[dart_aot_runner] Complete the port of dart_aot_runner (#13103)
* [dart_aot_runner] Complete the port of dart_aot_runner

- also adds the previously missing profiler symbols for dart_jit_runner
- CIPD package will contain both the JIT and AOT dart runners

* specify the inputs
2019-10-11 17:24:54 -07:00
Matt Carroll
9acec4102a
Move initialization into FlutterEngine (#12806) 2019-10-11 16:15:55 -07:00
Kaushik Iska
33b80ac98c
[dart_aot_runner] Generate vmservice aotsnapshots (#13101) 2019-10-11 16:03:30 -07:00
Kaushik Iska
3871bc42fc
[dart_aot_runner] Use the host_toolchain to build kernels (#13096) 2019-10-11 15:36:13 -07:00
Matt Carroll
d9d92a564b
Added FlutterActivity and FlutterFragment hook to cleanUpFlutterEngine() as symmetry for configureFlutterEngine(). (#41943) (#12987) 2019-10-11 13:52:21 -07:00
Dan Field
6f40beed77
java imports/style (#13082) 2019-10-11 11:54:02 -07:00
gaaclarke
4243fdb868
Removed retain cycle from notification center. (#13073) 2019-10-11 11:34:11 -07:00
Kaushik Iska
eed171ff35
[dart_aot_runner] Add rules to generate dart_aot binaries (#13074) 2019-10-11 09:42:28 -07:00
Kaushik Iska
0fd9b16883
Reland dart_aot_runner shims
This reverts commit f20c773c5e05a96974d56f230d9edb447f646b98.
2019-10-10 19:41:13 -07:00
Kaushik Iska
f20c773c5e
Revert "[dart_aot_runner] Add support for generating dart_aot snapshots (#13071)" (#13075)
This reverts commit e78c3f59c1a105e216e00db105d4f7391ccf01c1.
2019-10-10 18:00:09 -07:00
Kaushik Iska
e78c3f59c1
[dart_aot_runner] Add support for generating dart_aot snapshots (#13071)
This is part of the effort to port over dart_aot_runner
2019-10-10 17:22:11 -07:00
Chinmay Garde
835838ce4a
Put Metal renderer selection behind runtime flag and plist opt-in. (#13056) 2019-10-10 13:03:04 -07:00
Chinmay Garde
86e3ebb748
Allow embedders to specify arbitrary data to the isolate on launch. (#13047)
Since this is currently only meant to be used by the embedding internally, the setter in Objective-C is only exposed via the FlutterDartProject private class extension. Unit tests have been added to the shell_unittests harness.

Fixes https://github.com/flutter/flutter/issues/37641
2019-10-10 12:31:14 -07:00
Dan Field
a05803a0d2
Android targets create final zip artifacts (#13059) 2019-10-10 06:56:43 -07:00
sjindel-google
d9080029af
Remove use of the blobs snapshot format from unittests (#12563)
* Remove uses of the "blobs" snapshot format in Engine tests.

* Comments

* Rebasing against updated ELF loader API.
2019-10-10 14:03:42 +02:00
Dan Field
0622b051b6
Minimal test harness for iOS (#13029) 2019-10-09 21:16:11 -07:00
CloudWebRTC
0f9d88c7b6 Add texture support for macOS shell. (#8507) 2019-10-09 20:35:09 -07:00
gaaclarke
6b56ed7f6f
Refactor: FlutterDartProject (#13006)
- Removed unused instance variable
- Explicitly listed nullability
2019-10-09 07:21:44 -07:00
Greg Spencer
21b8224ae1
Send AccessibilityEvent.TYPE_VIEW_FOCUSED when input focus is set. (#12746)
When the focus changes, we should be sending a TYPE_VIEW_FOCUSED event. This enables that.
2019-10-08 16:54:17 -07:00
Dan Field
2f352d6629
Fix for a11y crash on iOS (#12990) 2019-10-08 16:37:09 -07:00
Jason Simmons
5d61a01973
Auto-formatter fixes for BUILD.gn files (#13005) 2019-10-08 15:15:47 -07:00
gaaclarke
9f650edd14
Started setting our debug background task id to invalid after completion. (#12999) 2019-10-08 13:12:52 -07:00
Chris Yang
0d59c9ec54
Add onUnregistered callback in 'Texture' and 'FlutterTexture' (#12695)
Texture unregistration is finished on the GPU thread. The FlutterTexture implementation might not know when it is finished which leads to a race condition. Adding this callback so the FlutterTexture is aware of end of the unregistration process.
2019-10-08 12:45:57 -07:00
liyuqian
df0e911c67
SkSL precompile (#12412)
For https://github.com/flutter/flutter/issues/40686

Unit tests added:
- CacheSkSLWorks
- VisitFilesCanBeCalledTwice
- CanListFilesRecursively
2019-10-08 11:51:28 -07:00