1691 Commits

Author SHA1 Message Date
Kaushik Iska
c33f2d2885
[flutter_runner] Port the new compilation trace from topaz (#12348) 2019-09-18 18:02:34 -07:00
Kaushik Iska
9036234cfe
[flutter_runner][async] Migrate dart/flutter to new async-loop APIs (#12347)
Change-Id: I11ca124878d2652798ed49958c42aa10ae019ef9
2019-09-18 17:45:53 -07:00
Kaushik Iska
725dc259cd
[flutter_runner] Move from runner context to component context (#12346)
* [flutter_runner] Move from runner context to component context

* remove the file references
2019-09-18 17:45:46 -07:00
Kaushik Iska
33ad6757e8
[flutter_runner] Port over the tuning advice (#12345) 2019-09-18 17:32:08 -07:00
Kaushik Iska
e0a24d6369
[flutter_runner] Remove usages of shared snapshots from CC sources (#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
7f7250f476
[flutter_runner] Do not use prebuilts just yet (#12340) 2019-09-18 15:31:57 -07:00
Dan Field
00a12c411f
Add missing CL, fix targets for Fuchsia (#12338) 2019-09-18 15:06:50 -07:00
Tamir Duberstein
00f23b2e73 [fuchsia] add fuchsia.netstack.Netstack (#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
36be89da49
Added javadoc comments to FlutterActivity and FlutterFragmentActivity. (#12328) 2019-09-17 16:22:13 -07:00
Ankit Dave
3b09d9f1ec [flutter] Remove old A11y API's. (#12308) 2019-09-17 15:40:17 -07:00
Chinmay Garde
1c7300ed1e
Account for root surface transformation on the surfaces managed by the external view embedder. (#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
f38f3a2f79
Introduce FlutterFragmentActivity (#12305) 2019-09-17 15:09:38 -07:00
Chinmay Garde
b4d8158316
Shuffle test order and repeat test runs once. (#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
b4d7655522
Fix continuous event polling in the GLFW event loop (#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
caf1df6b58 Tests for #11283 (#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
4159c2bfed
Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (#12128) 2019-09-17 12:00:46 -07:00
stuartmorgan
709fc6e00c
Adds PluginRegistry to the C++ client wrapper API (#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
d54ed1f13f
Add "type" to getDisplayRefreshRate protocol (#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
783deab110
Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (#12306) 2019-09-16 16:26:39 -07:00
George Wright
5a8da65592
Manage resource and onscreen contexts using separate IOSGLContext objects (#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
2620babef0
Made flutter startup faster by allowing initialization to be parallelized (#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
63873d9f42 Fix objects equal to null not being detected as null (#11283) 2019-09-16 12:16:38 -07:00
Qxyat
7d42bc70cf Reset NSNetService delegate to nil,when stop service. (#11270) 2019-09-16 10:45:52 -07:00
liyuqian
aac33d1bce
Reland "Smooth out iOS irregular input events delivery (#11817)" (#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
ef7bcafd5c
a11y: expose max character count for text fields (#12269) 2019-09-16 09:37:25 -07:00
Ryan Macnak
04f567bdde
Do not assume Platform.script is a Dart source file during training. (#12256)
Cf. dart-lang/sdk@74cff6c7df
2019-09-16 08:57:27 -07:00
Kaushik Iska
289d1eaaa9
Revert "Add iOS platform view mutation XCUITests to the scenario app (#11652)" (#12292)
This reverts commit b73cfdad4f88ddfad6114c77633a0947f0c5fff5.
2019-09-15 17:57:54 -07:00
Chris Yang
b73cfdad4f
Add iOS platform view mutation XCUITests to the scenario app (#11652) 2019-09-16 07:56:24 +08:00
gaaclarke
5075172fe7
FlutterViewController notify will dealloc (#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
07d4cd919a
[macos] Stops keeping track of text input models (#12267) 2019-09-13 14:30:20 -07:00
stuartmorgan
ca4c3f6df3
Add an initial macOS version of FlutterAppDelegate (#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
5c8611194d
[glfw/windows] Stops keeping track of input models (#12234) 2019-09-12 15:30:53 -07:00
Michael Klimushyn
3c6383f2db
Revert "Smooth out iOS irregular input events delivery (#11817)" (#12251)
This reverts commit b569e8c2fd5a444b6a3f7355a2f8c983c3a23e05.
2019-09-12 11:23:05 -07:00
Michael Klimushyn
dfa9498360
Enable platform view keyboard input on Android Q (#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
bbb1f12467
Adjust iOS frame start times to match the platform info (#11802) 2019-09-11 19:08:56 -07:00
Jim Graham
da84d59f64
Revert "Manage iOS contexts separately (#12078)" (#12233)
This reverts commit 4ac0663db7addd6c27904131d8260df66fa8c722.
2019-09-11 17:56:24 -07:00
George Wright
4ac0663db7
Manage iOS contexts separately (#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
2bdfb61a04
Namespace patched SDK names to not conflict with Topaz (#12218) 2019-09-11 08:19:58 -07:00
Jason Simmons
bfa43e1792
[flutter_runner] Generate symbols for the Dart VM profiler (#12048)
Ported from the original implementation in the Topaz tree.
2019-09-10 14:35:42 -07:00
Jason Simmons
2592d6efe2
[flutter_runner] Port the accessibility bridge from Topaz (#12054) 2019-09-10 11:29:08 -07:00
liyuqian
b569e8c2fd
Smooth out iOS irregular input events delivery (#11817)
Fixes https://github.com/flutter/flutter/issues/31086

This patch is a lower level implementation of
https://github.com/flutter/flutter/pull/36616 that would only impact iOS
engine, and host unittests.
2019-09-10 11:18:01 -07:00
Chinmay Garde
d816755508
Don't launch the observatory by default on each embedder unit-test invocation. (#12087)
There is no test to assert this and it unnecessarily slows down the test
harness and opens tons of port on the host.
2019-09-09 19:58:36 -07:00
Chinmay Garde
03e773a902
Guard availability of user notification related methods to iOS 10.0 (#12084)
* `NS_AVAILABLE_IOS(10_0)` makes us tell our compiler that the method needs
  to be stamped into the TU but we promise to do stuff in it only on iOS 10.0
  and above.
* `@availability` ensures that if those methods are called on iOS versions less
  than 10.0, we will do nothing with it. This guards us against the case where
  iOS introduced the functionality privately in older versions of iOS.
2019-09-09 20:25:29 -04:00
Maurice Parrish
9c00c26c8f
Add capability to add AppDelegate as UNUserNotificationCenterDelegate (#9864) 2019-09-09 14:54:00 -07:00
shoryukenn
38d545ee17 Improve Unicode handling on Windows (#11899)
Significantly improves the behavior of non-ASCII text input on Windows. Correctly
processes incoming character events as UTF-16, and for now uses UTF-32 for
the text model so that the existing index-based logic will work much more often.

Future work is still needed, but this will handle far more cases correctly.
2019-09-08 12:13:59 -07:00
xster
8cdb3afd65
Annotate nullability on FlutterEngine to make swift writing more ergonomic (#11808) 2019-09-08 00:25:07 -07:00
Kaushik Iska
35875e0f00
Revert "Manage resource and onscreen contexts using separate IOSGLContext objects (#11798)" (#12055)
This reverts commit a353f93d370dded7bc7756082fbab8b519679d4d.
2019-09-06 18:12:16 -07:00
George Wright
a353f93d37
Manage resource and onscreen contexts using separate IOSGLContext objects (#11798)
Manage resource and onscreen contexts using separate IOSGLContext objects
2019-09-06 16:44:49 -07:00
Kaushik Iska
c9ea4dba8d
[flutter_runner] Refactor our build rules to make them more inline with topaz. (#12034)
Also add flutter tool support for topaz in-tree builds that already have
a dependency on the framework repository.

After this the only major changes left are profiler symbols and
Framework mode.

This should make making topaz use our buldrules significantly easier.
2019-09-06 15:30:37 -07:00
Emmanuel Garcia
50bdbd769e
Document dependencies and remove support-v13 (#11912) 2019-09-06 15:25:59 -07:00