1793 Commits

Author SHA1 Message Date
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
Chinmay Garde
51c5bb42b4 Put Metal renderer selection behind runtime flag and plist opt-in. (flutter/engine#13056) 2019-10-10 13:03:04 -07:00
Chinmay Garde
b659646ffb Allow embedders to specify arbitrary data to the isolate on launch. (flutter/engine#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
Jason Simmons
1759de2b98 Allow embedders to disable causal async stacks in the Dart VM (flutter/engine#13004)
Fixes https://github.com/flutter/flutter/issues/39511
2019-10-10 10:09:03 -07:00
Dan Field
80492fb4e9 Android targets create final zip artifacts (flutter/engine#13059) 2019-10-10 06:56:43 -07:00
sjindel-google
5ea9c249cd Remove use of the blobs snapshot format from unittests (flutter/engine#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
7fb9737129 Minimal test harness for iOS (flutter/engine#13029) 2019-10-09 21:16:11 -07:00
CloudWebRTC
2362c4e741 Add texture support for macOS shell. (flutter/engine#8507) 2019-10-09 20:35:09 -07:00
gaaclarke
d4a3cc6b67 Refactor: FlutterDartProject (flutter/engine#13006)
- Removed unused instance variable
- Explicitly listed nullability
2019-10-09 07:21:44 -07:00
Chinmay Garde
95297dba87 Revert "Upgrade compiler to Clang 10. (#11256)" (flutter/engine#13017)
This reverts commit 655c98543235dd9452a304dc035d3e39990ebc2a.
2019-10-08 18:23:59 -07:00
Chinmay Garde
655c985432 Upgrade compiler to Clang 10. (flutter/engine#11256) 2019-10-08 17:45:30 -07:00
Greg Spencer
cb3ae0ec59 Send AccessibilityEvent.TYPE_VIEW_FOCUSED when input focus is set. (flutter/engine#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
117f6e94eb Fix for a11y crash on iOS (flutter/engine#12990) 2019-10-08 16:37:09 -07:00
Jason Simmons
4a39184fec Auto-formatter fixes for BUILD.gn files (flutter/engine#13005) 2019-10-08 15:15:47 -07:00
Ben Konyi
5c9fdc84d4 Unblock SIGPROF on flutter_tester start (flutter/engine#12813)
Fixes https://github.com/flutter/flutter/issues/35140
2019-10-08 15:13:08 -07:00
gaaclarke
15c78df45f Started setting our debug background task id to invalid after completion. (flutter/engine#12999) 2019-10-08 13:12:52 -07:00
Chris Yang
cc04914ab4 Add onUnregistered callback in 'Texture' and 'FlutterTexture' (flutter/engine#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
7bffe3c0a8 SkSL precompile (flutter/engine#12412)
For https://github.com/flutter/flutter/issues/40686

Unit tests added:
- CacheSkSLWorks
- VisitFilesCanBeCalledTwice
- CanListFilesRecursively
2019-10-08 11:51:28 -07:00
Chinmay Garde
b05e9e7d6a Add a unit-test to verify that root surface transformation affect platform view coordinates. (flutter/engine#12783)
See b/141980393 for details.

In the issue, the embedder (assumed to render Flutter contents of size 800 x 600 [1]) is meant to be displayed on its side. To achieve this, it specifies a root surface transformation that translates the surface by its width (or height when it held in the correct viewing position) and then rotates it counter-clockwise by 90 degrees. This test verifies that the Flutter Engine accounts for those transformations in the custom compositor platform view coodinates.

[1] The actual size is something different. 800x600 is for illustrative purposes.
2019-10-08 11:30:00 -07:00
Kate Lovett
73b60d4d7c Re-land Adding Link Semantics (flutter/engine#12972) 2019-10-08 11:27:56 -07:00
liyuqian
97da41eae7 Unblock Fuchsia roll (flutter/engine#12977)
See https://cirrus-ci.com/task/5367628704514048 and https://github.com/flutter/engine/pull/12822
2019-10-07 11:32:35 -07:00
Kate Lovett
0106398abd Revert "Adding Link SemanticsFlag (#12453)" (flutter/engine#12815)
This reverts commit 62e4f42e7640ee5f50fef9958b50906a5527d81a.
2019-10-04 17:06:32 -07:00
Dan Field
cbe5c07b4a unbreak unopt fuchsia (flutter/engine#12805) 2019-10-04 14:10:46 -07:00
Dan Field
066cd5c34c [flutter_runner] a11y updates, tests! (flutter/engine#12380) 2019-10-04 13:30:56 -07:00
WATER1350
bf73ca111d Fix crash in copypixelbuffer (flutter/engine#10326) 2019-10-04 13:21:17 -07:00
Kate Lovett
62e4f42e76 Adding Link SemanticsFlag (flutter/engine#12453) 2019-10-04 12:51:10 -07:00
Kaushik Iska
56b3ac4132 Prettify all CMX files (flutter/engine#12800) 2019-10-04 12:32:54 -07:00
Gary Qian
1f1ee25a47 Restart all modern Samsung keyboard IMM (flutter/engine#12780) 2019-10-04 15:14:38 -04:00
Dan Field
4d0ea3a6f0 Reland fuchsia build improvements (flutter/engine#12795) 2019-10-04 12:07:57 -07:00
Chinmay Garde
7bcb751f24 Disable EmbedderTest::CanLaunchAndShutdownMultipleTimes. (flutter/engine#12799)
Re-enabling this is tracked in https://github.com/flutter/flutter/issues/41999
2019-10-04 11:45:00 -07:00