2692 Commits

Author SHA1 Message Date
Jason Simmons
44bd4cf1d7 Log the results when ShellTest.Screenshot fails (flutter/engine#20932)
This test has been flaky on LUCI recently.

See https://github.com/flutter/flutter/issues/65026
2020-09-03 14:13:55 -07:00
gaaclarke
1302a1806a Started printing out error messages when the observatory won't be reachable because of permissions problems. (flutter/engine#20960) 2020-09-03 14:05:47 -07:00
LongCatIsLooong
6b250c5725 Fix iOS text field input keyboard flickering & crash (flutter/engine#20805) 2020-09-03 13:55:02 -07:00
Emmanuel Garcia
521827d230 Always set the callback during Rasterizer setup (flutter/engine#20976) 2020-09-03 10:48:46 -07:00
Nathan Rogers
a35a7967ea [fuchsia] Send trace events to system tracing on all configurations (flutter/engine#20974)
This change reverts https://github.com/flutter/engine/pull/15900.  The
design of the expected consumer of the original PR changed, and the
feature ended up going unused.  Since the unexpected difference in trace
event routing behavior has mostly ended up as a source of confusion,
change things back to route trace events to Fuchsia system tracing on
all configurations.
2020-09-03 10:21:36 -07:00
Emmanuel Garcia
a942137a5d Only clear GL context after changing the thread configuration (flutter/engine#20965) 2020-09-02 22:10:02 -07:00
Emmanuel Garcia
aea17076cb Clear GL context before Gr context (flutter/engine#20957) 2020-09-02 15:08:16 -07:00
Dan Field
f83e92cbaf Use hint freed specifically for image disposal (flutter/engine#20754)
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00
Emmanuel Garcia
21c1d0ac9f Clear the GL context only after submitting the frame (flutter/engine#20931)
* Clear the GL context only after submitting the frame
* Fix Screenshot test
2020-09-02 08:46:11 -07:00
Gary Qian
a1755b3feb [Android R] Integrate DisplayCutouts into viewportMetrics (flutter/engine#20921) 2020-09-02 05:18:35 -07:00
Yuqian Li
19ebd61442 Revert "Create root isolate asynchronously (#20142)" (flutter/engine#20937)
This reverts commit b3bb6df94c4537240fb563c2394c18ed984a82df.
2020-09-01 22:05:53 -07:00
Jim Graham
22e1f69704 Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (flutter/engine#20936)
This reverts commit 26659fa0fd05b2f3cc3c2e530298659702e1f869.
2020-09-01 21:21:07 -07:00
Emmanuel Garcia
12b8249404 Ensure all images are closed in FlutterImageView (flutter/engine#20842) 2020-09-01 16:57:45 -07:00
Alexander Brusher
26659fa0fd Adds fuchsia node roles to accessibility bridge updates. (flutter/engine#20385) 2020-09-01 13:33:02 -07:00
chenjianguang
b3bb6df94c Create root isolate asynchronously (flutter/engine#20142)
## Description
As the related issue refer, the application may be doing too much work on its main thread even in a simple hello_world demo.
That is because the creation of `Engine` on the ui thread takes a noticeable time, and it is blocking the platform thread in order to run `Shell::Setup` synchronously.
The cost of `Engine`'s constructor is mainly about the creating of root isolate. Actually, there used to be another time-consuming process, the default font manager setup, which was resolved by https://github.com/flutter/engine/pull/18225. 
Similar to https://github.com/flutter/engine/pull/18225, this pr move the creation of root isolate out from creating `Engine`. After this action, the main thread blocking is quite an acceptable slice.

## Related Issues
https://github.com/flutter/flutter/issues/40563 could be resolved by this pr.
2020-09-01 13:31:00 -07:00
stuartmorgan
d8919860ab Default C++ wrapper templates to EncodableValue (flutter/engine#20760)
The C++ wrapper makes heavy use of templates to support arbitrary types
in the platform channel classes, but in practice EncodableValue is what
essentially all code will use. This defaults those template types to
reduce boilerplate in plugin code (e.g., allowing the use of
MethodChannel<> instead of MethodChannel<EncodableValue>).
2020-09-01 10:56:46 -07:00
Jason Simmons
4bd9085a47 Pass text input key events to the EventResponder if they do not yield characters (flutter/engine#20912)
If the InputConnectionAdaptor receives a key event that does not move
the caret or produce a text character (such as the back button), then
the event should be given to the EventResponder which will forward it
to the view.

Fixes https://github.com/flutter/flutter/issues/64864
2020-08-31 17:56:09 -07:00
Jason Simmons
5aa323a30c Reset Shell::weak_factory_gpu_ on the raster thread (flutter/engine#20869) 2020-08-31 16:03:02 -07:00
stuartmorgan
f38bc774e7 [windows] Add horizontal scroll support (flutter/engine#20668)
The embedding was only handling vertical scroll events from the OS; this
adds horizontal as well.

Fixes https://github.com/flutter/flutter/issues/60835
2020-08-31 16:01:38 -07:00
Emmanuel Garcia
6f802144be Wait for first frame before checking layer tree (flutter/engine#20910) 2020-08-31 15:03:31 -07:00
xster
7b62a6c11a Add auto plugin registration to FlutterFragmentActivity as well (flutter/engine#20865) 2020-08-31 13:43:46 -07:00
Emmanuel Garcia
2f8279900b Reland: Enable hybrid composition by default on Android (#20722) (flutter/engine#20864)
This reverts commit bb885a23e20d79c163dc884530acaafd6c311f2a.
2020-08-31 12:17:11 -07:00
Emmanuel Garcia
2308969ed6 Fix race condition (flutter/engine#20905) 2020-08-31 10:11:41 -07:00
xster
c09700b409 Add a java injector for testing (flutter/engine#20789) 2020-08-29 22:29:23 -07:00
Emmanuel Garcia
9d05be2966 Add ability to disable the raster thread merger (flutter/engine#20800) 2020-08-28 17:25:00 -07:00
Greg Spencer
408d2228fa Reland: Implement delayed event synthesis key event handling for Android (flutter/engine#20736)
This re-lands the key event synthesis implementation for Android (Original PR: #19024, Revert PR: #19956). The only difference is sending the synthesized key events to the root view instead of the current view.

Without sending it to the root view, the system doesn't have any chance of handling keys like the back button. The event will still not be sent to the framework twice, since we turn off event propagation while re-dispatching the event.
2020-08-28 14:45:38 -07:00
David Worsham
c852497059 fuchsia: create new flutter_runner render path (flutter/engine#19584) 2020-08-28 14:17:17 -07:00
William Wold
2752ef1dcd Replace FlRenderer::get_visual() with more generic FlRenderer::setup_window_attr() (flutter/engine#20833) 2020-08-28 14:31:34 +12:00
William Wold
aff51746dd Consolidate FlRenderer initialization into fl_renderer_start() (flutter/engine#20763) 2020-08-28 09:57:14 +12:00
Mehmet Fidanboylu
b237cb1c9c Reland "Pass platform configuration to Dart VM for insecure socket policy (#20733)"
This reverts commit cc5fef5f3266b0088a8ee60e85d6c16ed7748464.
2020-08-27 14:23:31 -07:00
Chris Yang
c85f437dc9 |MessageLoopImpl::FlushTasks| runs one task at a time (flutter/engine#20771) 2020-08-27 14:18:02 -07:00
Jason Simmons
7a38d174d5 Ignore calls to AccessibilityBridge listeners after release (flutter/engine#20701)
AccessibilityBridge installs various listeners for Android events
that invoke Flutter engine APIs.  These listeners are removed in
AccessibilityBridge.release.  However, in some environments there may
be deferred calls to the listener that will still execute even after
the listener has been removed.  This change sets a flag during release
and ignores any listener invocations that happen after the flag is set.

See https://github.com/flutter/flutter/issues/63555 and
https://github.com/flutter/engine/pull/17311
2020-08-27 12:24:33 -07:00
renyou
cc5fef5f32 Revert "Pass platform configuration to Dart VM for insecure socket policy (#20733)" (flutter/engine#20812)
This reverts commit 749cede9a0c9692439cd5e585c8578462d285e97.
2020-08-27 08:23:30 -07:00
David Worsham
f98d00315d fuchsia: Call out legacy rasterizer code (flutter/engine#20761) 2020-08-26 19:36:14 -07:00
Gary Qian
cfe1db1146 Use Android R (API 30) getInsets() to compute padding (flutter/engine#18339) 2020-08-26 18:15:40 -07:00
Kaushik Iska
5e969b46ef [embedder] Add gl present callback that takes present info (flutter/engine#20672) 2020-08-26 15:53:01 -07:00
Kaushik Iska
a47cc2d479 Revert "[fuchsia] Adds a test for clock change (#19993)" (flutter/engine#20790)
This reverts commit 8b200432726241370f374071448f13bd4f5bf94d.
2020-08-26 12:29:03 -07:00
chunhtai
a53b6955ac Avoid passing nil to IOS accessibility announcement (flutter/engine#20700) 2020-08-26 10:38:03 -07:00
Filip Filmar
8b20043272 [fuchsia] Adds a test for clock change (flutter/engine#19993)
This is a Fuchsia-only shell test, confirming that when the timezone
setting is changed on the realm via Fuchsia's FIDL interface
`fuchsia.settings.Intl`, the Dart isolate running in that realm receives
the change and starts reporting the appropriate timestamp.

We already have a [similar test][tst] that verifies the timezones in the
dart VM matches the local timezone at start, but there was no test that
also verified timezone changes.

[tst]: https://github.com/flutter/engine/blob/master/shell/common/shell_unittests.cc#L1166

See issue #61284
2020-08-25 16:24:25 -07:00
Emmanuel Garcia
eb4c56aba4 Fix EGL_BAD_SURFACE when app is paused (flutter/engine#20735) 2020-08-25 12:39:40 -07:00
Dan Field
35d014eee7 Revert hint_freed (flutter/engine#20746)
This caused over-aggressive GCs, which vastly increased CPU usage benchmarks.

* Revert "fix build (#20644)"

This reverts commit 5e03f90cdd9392f95b47d08b398c18cab6d16b12.

* Revert "Hint freed (#19842)"

This reverts commit 73490a2ca444c8ca491712cde21a459453af8795.
2020-08-25 11:55:40 -07:00
Mehmet Fidanboylu
749cede9a0 Pass platform configuration to Dart VM for insecure socket policy (flutter/engine#20733) 2020-08-25 10:56:03 -07:00
Maksim Lin
37da36ab16 send newline char when input type is multiline (flutter/engine#20660) 2020-08-25 10:51:02 -07:00
Emmanuel Garcia
bb885a23e2 Revert "Enable hybrid composition by default on Android (#20722)" (flutter/engine#20745)
This reverts commit e57e7810a1c62535832abce02393e830fbd7f306.
2020-08-25 09:54:13 -07:00
Emmanuel Garcia
e57e7810a1 Enable hybrid composition by default on Android (flutter/engine#20722) 2020-08-24 13:10:23 -07:00
David Worsham
87f65be19e fuchsia: Clean shell_unittests under FEMU (flutter/engine#20704) 2020-08-24 12:47:31 -07:00
Chris Yang
2f28d3e968 The ForwardingGestureRecognizers to have back reference to the PlatformViewsController so it can access FlutterViewController when its available (flutter/engine#20708) 2020-08-24 12:41:02 -07:00
Chinmay Garde
15798a885b Fix race condition and data race in FrameInfoContainsValidWidthAndHeight. (flutter/engine#20706)
The data race: gl_surface_fbo_frame_infos_ in the test context to was appended
to on the raster task runner but read on the platform task runner. This is now
sidestepped by using a callback and pushing that responsibility to the test.
Setting the callback is guarded behind a mutex.

The race condition: The assertions were previously run when the UI thread was
done generating the frames. However, the assertions were run on the results
collected on the raster thread in response the frame requests from UI thread.
Just run the assertions on the raster thread directly.

Fixes https://github.com/flutter/flutter/issues/64344
2020-08-24 11:48:13 -07:00
Sanjay Chouksey
a67ecd536d Update view attributes after creation (flutter/engine#20638) 2020-08-22 12:46:04 -07:00
LI DONGZE
38ad113515 Reporting back native stacktrace to dart side for crash reporting. (flutter/engine#20280)
* Add native stacktrace on iOS

* Add native stacktrace on Android

* format and changing naming to errorWithCode on iOS

* reformat

* Remove stacktrace from decodeEnvelope, not needed.

* Separate encodeErrorEnvelopeWithStacktrace with original encode function

* Add unit tests

* re-format

* change comments for stacktrace

* Remove changes for iOS

Co-authored-by: Ben Li <libe@google.com>
2020-08-21 19:59:36 -07:00