3051 Commits

Author SHA1 Message Date
Ben Konyi
246f1c9c5e Update --dart-vm-flags whitelist to include --write-service-info and --sample-buffer-duration (flutter/engine#12395)
These flags were recently added and are safe to pass through to the VM
for development.
2019-09-23 13:28:42 -07:00
chunhtai
051ed653cc Add system font change listener for windows (flutter/engine#12276)
* Add windows font change logic

* update

* fix comment
2019-09-23 13:23:46 -07:00
gaaclarke
1cad708800 Added unit tests for method channels. (flutter/engine#12373)
Added unit tests for method channels.
2019-09-20 14:25:56 -07:00
Dan Field
128398be60 Sync dart_runner (flutter/engine#12375) 2019-09-20 12:58:08 -07:00
liyuqian
56bb40c017 Revert "Reland "Smooth out iOS irregular input events delivery (#11817)" (#12280)" (flutter/engine#12364)
This reverts commit dedf24e797d6257f9bb776cdf0d7525a16610321.

Reason: flutter/flutter#40863

TBR: chinmaygarde, iskakaushik
2019-09-19 19:39:36 -07:00
Matt Carroll
fce67bf3a8 Fixes race condition that was reported internally. (flutter/engine#12362) 2019-09-19 16:36:17 -07:00
Siva
c5ac59ebee  Roll src/third_party/dart 7c1821c4aa...ea969c358e (flutter/engine#12339)
* Roll src/third_party/dart 7c1821c4aa...ea969c358e (6 commits)

dart-lang/sdk@7c1821c4aa [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split
dart-lang/sdk@0c23664c8f [vm/fuzzer] Reduce number of methods per class
dart-lang/sdk@3135eb569d [vm/bytecode] Fix initial scope in field initializers
dart-lang/sdk@1345fb80ac Use TypeParameterElement instead of TypeParameterType in inference.
dart-lang/sdk@430ff6d649 Migration: fix "matching" functionality of edge testing infrastructure.
dart-lang/sdk@f1bff1b512 Add option to run ddb with observatory
2019-09-19 16:07:34 -07:00
Dan Field
0b33917787 java lints (flutter/engine#12354) 2019-09-18 21:20:04 -07:00
Kaushik Iska
4d6b95ebdc [flutter_runner] Port vulkan surface changes (flutter/engine#12350)
[flutter_runner] use dedicated allocation info

    This informs the vulkan driver that we're allocating memory
    dedicated to a single image. This is required for aemu and
    might also allow future drivers to make optimizations currently
    not possible.

    No change in behavior. Existing tests (modular_tests,
    scenic_tests, etc.) are sufficient and regressions will be
    prevented by running these tests on aemu.

    DX-939 #comment

    Test: fx shell run fuchsia-pkg://fuchsia.com/basemgr#meta/basemgr.cmx --base_shell=fuchsia-pkg://fuchsia.com/spinning_cube#meta/spinning_cube.cmx
    Change-Id: If4ecd9aaa09f12f94654a68e8e9fe979748f44af

    [flutter_runner] use external image create info

    DX-939 #progress
    MA-394 #progress

    This informs the vulkan driver that we're creating an image
    that will be backed by external memory. The driver driver can
    decide to use different memory requirements based on the if
    memory for the image can be exported or not.

    No change in behavior. Existing tests (modular_tests,
    scenic_tests, etc.) are sufficient and regressions will be
    prevented by running these tests on aemu.

    Test: fx shell run fuchsia-pkg://fuchsia.com/basemgr#meta/basemgr.cmx --base_shell=fuchsia-pkg://fuchsia.com/spinning_cube#meta/spinning_cube.cmx
    Change-Id: I489318c2e31f752f76c80a81245e203861d44d94
2019-09-18 19:06:12 -07:00
Kaushik Iska
5bdd5ec96c [flutter_runner] Explicitly set |trace_skia| to false (flutter/engine#12349)
Explicitly set |Application|'s |flutter::Settings| |trace_skia| field to
false (it currently defaults to false), in order to slightly simplify
the enabling skia trace events workflow.

PT-145 #comment-patch

Change-Id: Ib40f9ed3dc6f824056465db2cd45309c78b7e3b4
2019-09-18 18:02:43 -07:00
Kaushik Iska
51fc8e108d [flutter_runner] Port the new compilation trace from topaz (flutter/engine#12348) 2019-09-18 18:02:34 -07:00
Kaushik Iska
b198248b55 [flutter_runner][async] Migrate dart/flutter to new async-loop APIs (flutter/engine#12347)
Change-Id: I11ca124878d2652798ed49958c42aa10ae019ef9
2019-09-18 17:45:53 -07:00
Kaushik Iska
555f0b2506 [flutter_runner] Move from runner context to component context (flutter/engine#12346)
* [flutter_runner] Move from runner context to component context

* remove the file references
2019-09-18 17:45:46 -07:00
Kaushik Iska
4063939bd8 [flutter_runner] Port over the tuning advice (flutter/engine#12345) 2019-09-18 17:32:08 -07:00
Kaushik Iska
9e522b13b1 [flutter_runner] Remove usages of shared snapshots from CC sources (flutter/engine#12343)
Build rules still reference creating share snapshot data and instructions. This makes the engine to always pass them as empty to the dart vm. To be followed up with a change to alter the build rules to stop referencing the shared snapshots.

This is not being used currently and the fact that the runner will be built outside of the flutter tree means that the apps will not have much to gain via shared snapshots. The rationale behind this change is to partially make migrating the runner out of topaz tree easier.

Change-Id: Ibc4dd6a298d65082416af753522f5a17c88a750a
2019-09-18 17:31:54 -07:00
Kaushik Iska
2c1b30a4f2 [flutter_runner] Do not use prebuilts just yet (flutter/engine#12340) 2019-09-18 15:31:57 -07:00
Dan Field
a8cfcfc78d Add missing CL, fix targets for Fuchsia (flutter/engine#12338) 2019-09-18 15:06:50 -07:00
Tamir Duberstein
8156de6820 [fuchsia] add fuchsia.netstack.Netstack (flutter/engine#12325)
Needed in preparation for
https://dart-review.googlesource.com/c/sdk/+/117620.

Test:
  git grep -l -E '(socket\.Provider|NameLookup)' | \
  xargs grep -L fuchsia.netstack.Netstack
2019-09-18 12:01:49 -07:00
Matt Carroll
8b3ca2b9c9 Added javadoc comments to FlutterActivity and FlutterFragmentActivity. (flutter/engine#12328) 2019-09-17 16:22:13 -07:00
Ankit Dave
9cde840656 [flutter] Remove old A11y API's. (flutter/engine#12308) 2019-09-17 15:40:17 -07:00
Chinmay Garde
c8ecb03fa8 Account for root surface transformation on the surfaces managed by the external view embedder. (flutter/engine#11384)
The earlier design speculated that embedders could affect the same
transformations on the layers post engine compositor presentation but before
final composition.

However, the linked issue points out that this design is not suitable for use
with hardware overlay planes. When rendering to the same, to affect the
transformation before composition, embedders would have to render to an
off-screen render target and then apply the transformation before presentation.
This patch negates the need for that off-screen render pass.

To be clear, the previous architecture is still fully viable. Embedders still
have full control over layer transformations before composition. This is an
optimization for the hardware overlay planes use-case.

Fixes b/139758641
2019-09-17 15:16:59 -07:00
Matt Carroll
c8c68ac789 Introduce FlutterFragmentActivity (flutter/engine#12305) 2019-09-17 15:09:38 -07:00
Chinmay Garde
7dda245874 Shuffle test order and repeat test runs once. (flutter/engine#12275)
The tests we write must be resilient to the order in which they are run in the
harness. That is, they must not rely on global state set by other tests that
have already run in the process. Also, these tests must themselves be
repeatable. That is, they must correctly clean up after themselves and be able
to run successfully again in the same process.

This patch adds some safeguards against (but does NOT guarantee) the addition of
tests that violate the dictum.

Additionally, test failures must be easily reproducible for folks investigating
the test failure. Also, tests that assert correctness of unrelated code must not
stop progress on the authors patch.

This changes does not hinder reproducibility of test failures because the random
seed is printed in the logs before running each test. Developers attempting to
reproduce the failure locally can do the same via the following invocation
`--gtest_shuffle --gtest_repeat=<the count> --gtest_random_seed=<seed from failing run>`.

This change does introduce potential burden on patch authors that may see
failures in unrelated code as a newly failing shuffle seed is used on their
runs. To ameliorate this, we will formulate guidance for them to aggressively
mark such tests as disabled and file bugs to enable the same.

The test seed is intentionally kept low because it’s purpose is to test that
individual tests are repeatable. It must not be used as a replacement for
fuzzing.
2019-09-17 14:50:51 -07:00
Jason Simmons
c667b18e15 Fix continuous event polling in the GLFW event loop (flutter/engine#12320)
* Do not pass a milliseconds::max() timeout that will overflow when converted
  to nanoseconds
* Avoid holding the task_queue_mutex_ while calling glfwWaitEventsTimeout
* Use a signed type to hold the difference between a task's timestamp and
  the current engine time

Fixes https://github.com/flutter/flutter/issues/40281
2019-09-17 13:54:38 -07:00
rafern
7d72616400 Tests for #11283 (flutter/engine#12322)
Added tests for #11283. The itEncodesNullObjects test fails with the branch before the merge and succeeds with the master branch
2019-09-17 13:52:40 -07:00
xster
e8717143e9 Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (flutter/engine#12128) 2019-09-17 12:00:46 -07:00
stuartmorgan
c66d5e6d17 Adds PluginRegistry to the C++ client wrapper API (flutter/engine#12287)
Makes the plugin registration structure consistent with macOS. This will
be used in generated plugin registrant files rather than a specific
implemenation class, so this helps unblock the creation of generated
registrants on Windows and Linux.
2019-09-17 11:41:22 -07:00
liyuqian
8bb2b639df Add "type" to getDisplayRefreshRate protocol (flutter/engine#12319)
Per kenzieschmoll's request.

Will update https://github.com/flutter/flutter/wiki/Engine-specific-Service-Protocol-extensions once this is merged.
2019-09-17 11:35:01 -07:00
Jason Simmons
668996bc06 Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (flutter/engine#12306) 2019-09-16 16:26:39 -07:00
George Wright
4d8deabab5 Manage resource and onscreen contexts using separate IOSGLContext objects (flutter/engine#12277)
Manage resource and onscreen contexts using separate IOSGLContext objects.

FlutterView owns the onscreen context, and PlatformViewIOS owns the resource context.
2019-09-16 16:17:46 -07:00
gaaclarke
68c0c11bad Made flutter startup faster by allowing initialization to be parallelized (flutter/engine#10182)
Made flutter startup faster by allowing initialization to be parallelized.  This resulting in a 15% decrease in startup time (~0.05ms)
2019-09-16 15:04:51 -07:00
rafern
eaef788323 Fix objects equal to null not being detected as null (flutter/engine#11283) 2019-09-16 12:16:38 -07:00
Qxyat
a8f0713575 Reset NSNetService delegate to nil,when stop service. (flutter/engine#11270) 2019-09-16 10:45:52 -07:00
liyuqian
dedf24e797 Reland "Smooth out iOS irregular input events delivery (#11817)" (flutter/engine#12280)
Additionally, we now use the engine directly as a delegate instead of storing potentially dead runtime_controller.

Unit tests have been updated to include an engine restart check which would fail before the fix.

This fixes https://github.com/flutter/flutter/issues/40303
2019-09-16 10:42:44 -07:00
Michael Goderbauer
bffaa526a2 a11y: expose max character count for text fields (flutter/engine#12269) 2019-09-16 09:37:25 -07:00
Ryan Macnak
891db996e8 Do not assume Platform.script is a Dart source file during training. (flutter/engine#12256)
Cf. dart-lang/sdk@74cff6c7df
2019-09-16 08:57:27 -07:00
Kaushik Iska
1e34d6a443 Revert "Add iOS platform view mutation XCUITests to the scenario app (#11652)" (flutter/engine#12292)
This reverts commit f2eb1d4bd779accbc293edcf62826fbf48d166ad.
2019-09-15 17:57:54 -07:00
Chris Yang
f2eb1d4bd7 Add iOS platform view mutation XCUITests to the scenario app (flutter/engine#11652) 2019-09-16 07:56:24 +08:00
gaaclarke
ab8dae9cc6 FlutterViewController notify will dealloc (flutter/engine#12232)
Made the flutter view controllers dealloc notification more
generic and started turning off semantics when the view controller
is remotely deleted.
2019-09-13 17:33:03 -07:00
Francisco Magdaleno
4090600949 [macos] Stops keeping track of text input models (flutter/engine#12267) 2019-09-13 14:30:20 -07:00
stuartmorgan
63c3a631f7 Add an initial macOS version of FlutterAppDelegate (flutter/engine#12230)
Creates a starting point for an app delegate. For now it just
incorporates the menu and window renaming functionality that's currently
in the FDE example, but in the future this will also do forwarding of
application lifecycle events to plugins.

Fixes https://github.com/flutter/flutter/issues/32419
2019-09-12 16:03:18 -07:00
Francisco Magdaleno
71f6d9cde9 [glfw/windows] Stops keeping track of input models (flutter/engine#12234) 2019-09-12 15:30:53 -07:00
Michael Klimushyn
862f40c774 Revert "Smooth out iOS irregular input events delivery (#11817)" (flutter/engine#12251)
This reverts commit 6b742994a371f5edded8925708d101186c950ada.
2019-09-12 11:23:05 -07:00
Michael Klimushyn
eef9a08469 Enable platform view keyboard input on Android Q (flutter/engine#12085)
Naively embedded platform views on Android were never able to receive
keyboard input, because they were never focusable. So far we've worked
around the limiation by hooking into InputMethodManager and proxying the
InputConnection from a focused window over to the embeded view.

Android Q changed InputMethodManager to be instanced per display instead
of a singleton. Because of this our proxy hook was never being called,
since it was being set up on a different instance of IMM than was being
used in the virtual display.

Update `SingleViewPresentation` to store the IMM from the focused window
and return it whenever there are any calls to `INPUT_METHOD_SERVICE`.
This hooks our proxy back into place for the embedded view in the
virtual display. This restores the functionality of our workaround from
previous versions.

Unfortunately there's still a lot of noisy error logs from IMM here. It
can tell that the IMM has a different displayId than what it's expecting
from the window.

This also updates the unit tests to support SDK=27. SDK 16 doesn't have
DisplayManager, so there were NPEs attempting to instantiate the class
under test.
2019-09-12 09:50:54 -07:00
Jim Graham
f88d9721fc Adjust iOS frame start times to match the platform info (flutter/engine#11802) 2019-09-11 19:08:56 -07:00
Jim Graham
3b0523005a Revert "Manage iOS contexts separately (#12078)" (flutter/engine#12233)
This reverts commit d10b72a5c9cecb3e2217f68580aa4aac98d42069.
2019-09-11 17:56:24 -07:00
George Wright
d10b72a5c9 Manage iOS contexts separately (flutter/engine#12078)
Manage resource and onscreen contexts using separate IOSGLContext objects. FlutterView owns the onscreen context, and PlatformViewIOS owns the resource context.
2019-09-11 14:32:26 -07:00
Kaushik Iska
f4ecd9c175 Namespace patched SDK names to not conflict with Topaz (flutter/engine#12218) 2019-09-11 08:19:58 -07:00
Jason Simmons
a2819be2e2 [flutter_runner] Generate symbols for the Dart VM profiler (flutter/engine#12048)
Ported from the original implementation in the Topaz tree.
2019-09-10 14:35:42 -07:00
Jason Simmons
0354d92bea [flutter_runner] Port the accessibility bridge from Topaz (flutter/engine#12054) 2019-09-10 11:29:08 -07:00