1822 Commits

Author SHA1 Message Date
Justin McCandless
c1d8b3c16d NO_SUGGESTIONS keyboard flag in Android (flutter/engine#13099)
Add the enableSuggestions parameter to control Android's keyboard suggestions
2019-10-23 10:47:19 -07:00
Francisco Magdaleno
05dbdd8816 Send flag modified events to the framework (flutter/engine#13269) 2019-10-22 19:01:00 -07:00
Chinmay Garde
b7705127a6 Allow embedders to update preferrred locales. (flutter/engine#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
c108c0af17 Avoid accessing the Cocoa view on the GPU or IO task runners. (flutter/engine#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
George Wright
f99f00b0e3 Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations (flutter/engine#13273)
Make flutter_tester support multithreaded testing, and run all Dart tests in both single and multithreaded configurations

This also modifies Shell::GetUIIsolateLastError() and Shell::EngineHasLivePorts() so that they must be called from the UI task runner.
2019-10-22 14:10:57 -07:00
gaaclarke
ac32ac8391 Made restarting the Engine remember the last entrypoint that was used. (flutter/engine#13289) 2019-10-22 14:01:52 -07:00
Ryan Macnak
344c0abb0a Roll Dart to 6a65ea9cad4b014f88d2f1be1b321db493725a1c. (flutter/engine#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
Chinmay Garde
d003548073 Disable flaky test ShellTest_ReportTimingsIsCalled. (flutter/engine#13292)
Investigation is tracked in https://github.com/flutter/flutter/issues/43192
2019-10-22 11:56:31 -07:00
Jason Simmons
51f77f7203 Do not request executable permission on Fuchsia file mappings unless it is required (flutter/engine#13290)
Fixes https://github.com/flutter/flutter/issues/43273
2019-10-22 11:24:51 -07:00
gaaclarke
ec08de4bc5 Revert "Made restarting the Engine remember the last entrypoint that was used. (#13264)" (flutter/engine#13287)
This reverts commit ba50a6dfba72b30a7a06cfb1ee5d40c2316b8a71.
2019-10-22 10:03:10 -07:00
gaaclarke
ba50a6dfba Made restarting the Engine remember the last entrypoint that was used. (flutter/engine#13264) 2019-10-22 08:10:57 -07:00
Matt Carroll
341106f69a Forwards Activity result to FlutterFragment in FlutterFragmentActivity. (flutter/engine#13214) 2019-10-21 17:05:46 -07:00
George Wright
9b641268fc Ensure we call into Engine from the UI taskrunner in Shell::EngineHasLivePorts (flutter/engine#13265) 2019-10-21 15:56:03 -07:00
Jonah Williams
bec5aae594 fix NPE in accessibility bridge (flutter/engine#13255) 2019-10-21 15:35:34 -07:00
Jason Simmons
25e7638daa Hold a reference to the Skia unref queue in UIDartState (flutter/engine#13239)
Obtaining the SkiaUnrefQueue through the IOManager is unsafe because
UIDartState has a weak pointer to the IOManager that can not be dereferenced
on the UI thread.
2019-10-21 14:15:03 -07:00
Kaushik Iska
8ed91e89cf Add templates to generate fuchsia host bundles (flutter/engine#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
8f2cb01779 Adds Dark Mode support to new Android embedding (this was accidentally missed previously). (flutter/engine#13215) 2019-10-18 12:46:09 -07:00
Jacek Fedoryński
0b85f16f31 Add repeatCount to FlutterKeyEvent (flutter/engine#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
0a7f937d04 Specify a human readable reason for an error from the embedder API. (flutter/engine#13218)
Fixes https://github.com/flutter/flutter/issues/42480
2019-10-17 17:29:37 -07:00
George Wright
60e88f7a6c Re-enable WeakPtr ThreadChecker and fix associated failures (flutter/engine#12257)
This re-enables thread safety checks for WeakPtr. WeakPtrs can't be used on a thread other than the one the WeakPtrFactory was created on.

This fixes the unit tests and adds a getUnsafe() method to WeakPtr to work around the remaining unresolved locations where we are using WeakPtr unsafely.
2019-10-17 14:10:16 -07:00
Chinmay Garde
d102e4086e Re-land "Custom compositor layers must take into account the device pixel ratio."
This reverts commit 674e5f911f1d19a0611b603968a8307415f75b35 and applies iOS fixes.
2019-10-17 14:07:51 -07:00
Chinmay Garde
7634e4d38b Add trace events around custom compositor callbacks. (flutter/engine#13212) 2019-10-17 14:07:11 -07:00
Chinmay Garde
674e5f911f Revert "Custom compositor layers must take into account the device pixel ratio. (#13193)" (flutter/engine#13211)
This reverts commit c805fb227166d2097a7795569df1365cb9e736a8.
2019-10-17 12:59:27 -07:00
Chinmay Garde
c805fb2271 Custom compositor layers must take into account the device pixel ratio. (flutter/engine#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
be5bc34af1 Add a task runner for the Win32 embedding (flutter/engine#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
395f1cda67 Remove incomplete static thread safety annotations. (flutter/engine#13151)
Fixes https://github.com/flutter/flutter/issues/42704.
2019-10-16 17:28:31 -07:00
Jason Simmons
27cd426259 Remove redundant call to updateEditingState in sendKeyEvent (flutter/engine#13175)
See https://github.com/flutter/flutter/issues/41005
2019-10-16 15:53:12 -07:00
liyuqian
6e44e98a07 Revert "Update compiler to Clang 10. (#13177)" (flutter/engine#13181)
This reverts commit 69782a218eb0cfcdafc8176193aa4c6c8fe5bd8b.

Reason: this seems to break our LUCI build https://ci.chromium.org/p/flutter/g/engine/console

Specifically, the following new issues were found that need to addressed before attempting
this roll again.

1. More symbols are being exported out of libflutter.so on Android https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8899411714657886224/+/steps/Verify_exported_symbols_on_release_binaries/0/stdout

2. ___isOSVersionAtLeast is not present on iOS https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8899411714401395808/+/steps/build_ios_debug_sim/0/stdout
2019-10-16 14:25:10 -07:00
Chinmay Garde
69782a218e Update compiler to Clang 10. (flutter/engine#13177) 2019-10-16 13:01:20 -07:00
Chinmay Garde
f200ea0af9 Revert "Issue 13238: on iOS, force an orientation change when the current orientation is not allowed" (flutter/engine#13160)
This reverts commit 0790110fd28dd9ff72140ce15d3f6f877e2095e8.
2019-10-15 17:24:49 -07:00
Josh
0790110fd2 Issue 13238: on iOS, force an orientation change when the current orientation is not allowed (flutter/engine#12295) 2019-10-15 14:36:59 -07:00
Chinmay Garde
9004744d6e Allow embedders to specify a render task runner description. (flutter/engine#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
63e93b2f77 Add flutter_tester binary to the CIPD package (flutter/engine#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
9b9dd7d20d Support empty strings and vectors in standard codec (flutter/engine#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)
3cc363909a Adding deviceId to KeyEventChannel enconding method (flutter/engine#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
4b9fc4c1a5 Fire PlatformViewController FlutterView callbacks (flutter/engine#13015)
Fixes a bug where `PlatformViewController` was not being notified of `FlutterView` attachment changes.
2019-10-14 14:03:25 -07:00
gaaclarke
729a871326 iOS Platform View: Fixed overrelease of the observer. (flutter/engine#13093) 2019-10-14 13:49:02 -07:00
liyuqian
892f852039 Change IO thread shader cache strategy (flutter/engine#13121)
So it's the same with the GPU thread.

Otherwise, some shaders may be cached in binary on the IO thread, and we will lose them when we do the SkSL precompile.

For b/140174804
2019-10-14 13:05:05 -07:00
Kaushik Iska
04a6d3e4e0 [dart_aot_runner] Complete the port of dart_aot_runner (flutter/engine#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
d632e81dd4 Move initialization into FlutterEngine (flutter/engine#12806) 2019-10-11 16:15:55 -07:00
Kaushik Iska
0a1600a6d1 [dart_aot_runner] Generate vmservice aotsnapshots (flutter/engine#13101) 2019-10-11 16:03:30 -07:00
Kaushik Iska
363a57f873 [dart_aot_runner] Use the host_toolchain to build kernels (flutter/engine#13096) 2019-10-11 15:36:13 -07:00
liyuqian
f24924fa9b Remove persistent cache unittest timeout (flutter/engine#13091)
This fixes https://github.com/flutter/flutter/issues/42465
2019-10-11 14:24:12 -07:00
Matt Carroll
5e17ccdf32 Added FlutterActivity and FlutterFragment hook to cleanUpFlutterEngine() as symmetry for configureFlutterEngine(). (#41943) (flutter/engine#12987) 2019-10-11 13:52:21 -07:00
Dan Field
0f36ed0d16 java imports/style (flutter/engine#13082) 2019-10-11 11:54:02 -07:00
gaaclarke
48ab41ac63 Removed retain cycle from notification center. (flutter/engine#13073) 2019-10-11 11:34:11 -07:00
Kaushik Iska
5a663507c2 [dart_aot_runner] Add rules to generate dart_aot binaries (flutter/engine#13074) 2019-10-11 09:42:28 -07:00
Kaushik Iska
2dd184d5d5 Reland dart_aot_runner shims
This reverts commit c375655fe1042d1de9b79f348968d6e297a5c271.
2019-10-10 19:41:13 -07:00
Kaushik Iska
c375655fe1 Revert "[dart_aot_runner] Add support for generating dart_aot snapshots (#13071)" (flutter/engine#13075)
This reverts commit 61ab9f02318d90b0159e410e3f528a3a5d5fe77a.
2019-10-10 18:00:09 -07:00
Kaushik Iska
61ab9f0231 [dart_aot_runner] Add support for generating dart_aot snapshots (flutter/engine#13071)
This is part of the effort to port over dart_aot_runner
2019-10-10 17:22:11 -07:00