2667 Commits

Author SHA1 Message Date
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
Chris Yang
23e891ddc8 Enable ios platform view by default (flutter/engine#20671) 2020-08-20 17:46:01 -07:00
stuartmorgan
ab823bd15e [windows] Mostly eliminate the state structs (flutter/engine#20662)
The Windows embedding was based on the GLFW embedding, which grew
organically from a singe-file implementation that used structs to manage
all of the important state. It is in the process of being converted to a
cleaner object-based architecture, but currently it is a hybrid of
objects and structs that have redundant data, making it very prone to
errors of forgetting to update pointers in multiple locations.

This reduces the remaining structs to only a single pointer to the
larger object that manages the responsibilities that handle is
associated with, so that there is no need to wire things together in
multiple places.

For now they continue to exist as projections of the larger objects, but
that will be eliminated over time by having an object structure that
better reflects the API structure.

Fixes https://github.com/flutter/flutter/issues/64250
2020-08-20 16:50:06 -07:00
Kaushik Iska
2021143b42 All shape related structs are together (flutter/engine#20665) 2020-08-20 15:21:02 -07:00
stuartmorgan
f6ff52c644 Use references for C++ MethodResult and EventSink (flutter/engine#20651)
The response APIs for method channels and event channels used pointers
for optional parameters; this kept the API surface simple, but meant
that they couldn't take rvalues. As a result, returning success values
or error details often took an extra line, declaring a variable for the
result just to have something to pass the address of.

This converts them to using references, with function overloading to
allow for optional parameters, so that values can be inlined.

For now the pointer versions are still present, so that conversion can
be done before it becomes a breaking change; they will be removed soon.

Part of https://github.com/flutter/flutter/issues/63975
2020-08-20 15:10:28 -07:00
David Worsham
3a6e0d47c6 fuchsia: Convert legacy permutations to build flag (flutter/engine#20647) 2020-08-19 19:09:51 -07:00
James Clarke
a1d268a61b Fix flutter#40068 Redraw issues on resize/minimize/maximize on Windows and startup in release (flutter/engine#20357)
* Fix redraw issues

* Address CR feedback.

* Fix build

* CR feedback
2020-08-19 16:19:09 -07:00
Kaushik Iska
a8c392e6b8 [embedder] Add FBO callback that takes frame info (flutter/engine#20617) 2020-08-19 16:06:02 -07:00
Dan Field
5e03f90cdd fix build (flutter/engine#20644) 2020-08-19 14:35:45 -07:00
Jason Simmons
72dabb020d Release the AccessibilityBridge when destroying a legacy FlutterView (flutter/engine#20610) 2020-08-19 14:11:02 -07:00
chunhtai
df10c2b3b4 Missing default focus when navigating to a page with no SemanticsNode that sets namesRoute:true (flutter/engine#20516) 2020-08-19 14:06:03 -07:00
Dan Field
73490a2ca4 Hint freed (flutter/engine#19842)
* Hint the VM when a layer or picture goes out of scope
2020-08-19 14:04:31 -07:00
egdaniel
0ee7007d63 Remove use of ctors on Skia Vulkan struct (flutter/engine#20630)
Skia is removing the ctors on these structs so removing them.
2020-08-19 13:18:25 -04:00
Stas Parshin
fa3e19be27 Fix NPE in PlatformViewsController.checkInputConnectionProxy (flutter/engine#20622) 2020-08-19 08:34:04 -07:00
Chris Yang
72162b7a66 Ensure threads are merged when tearing down the Rasterizer (flutter/engine#19919) 2020-08-19 08:31:01 -07:00
stuartmorgan
bb04632eeb [windows] Allow delegation of top-level WindowProc (flutter/engine#20613)
Adds APIs for runners to delegate WindowProc handlers into the Flutter
engine, and for plugins to register as possible delegates.

This allows for plugins to alter top-level window behavior in ways that
can only be done from the WindowProc, such as resize control. This
functionality remains entirely on the native side, so is synchronous.

Part of https://github.com/flutter/flutter/issues/53168
2020-08-19 06:49:39 -07:00
David Worsham
8b4e07c198 fuchsia: Increase timeout for flaky test (flutter/engine#20606) 2020-08-18 17:14:30 -07:00
Chase Latta
5f7105f763 convert zircon and fuchsia to null-safety (flutter/engine#20577) 2020-08-18 13:15:00 -07:00
Emmanuel Garcia
a2732e0538 Reland: Create PlatformView instance right after method channel call from Dart (flutter/engine#20568) 2020-08-17 16:28:15 -07:00
gaaclarke
9ef815d6dc Revert "Create PlatformView instance right after method channel call from Dart (#20500)" (flutter/engine#20564)
This reverts commit a87eaedcc22c1b96065222cdf6a05fe32c0b09f0.
2020-08-17 11:17:03 -07:00
stuartmorgan
85ffc9bb19 Send locale information in the Windows embedding (flutter/engine#20455)
Queries the system list of user-preferred languages, and sends it to the
engine just after starting it up.

Windows portion of https://github.com/flutter/flutter/issues/45152
2020-08-17 05:46:39 -07:00
stuartmorgan
67cf6c312c [windows] Expose the binary messenger from FlutterEngine (flutter/engine#20551)
Relands https://github.com/flutter/engine/pull/20399

Makes BinaryMessenger available from FlutterEngine, rather than just the plugin registrar. This allows for method channels directly in applications without building them as plugins, and matches the other platforms.

Requires some restructuring of code and GN targets in the client wrappers to make the internals in the shared section usable by the implementations of platform-specific parts of the wrappers. Also fixes a latent issue with EnableInputBlocking symbols being declared but not defined for Windows that came up during testing of the restructing.

Fixes https://github.com/flutter/flutter/issues/62871
2020-08-17 05:44:48 -07:00
Mehmet Fidanboylu
fd10b885d8 Enable iOS plumbing for network security and add tests (flutter/engine#20492) 2020-08-16 21:20:26 -07:00
stuartmorgan
02796951ef Revert "[windows] Expose the binary messenger from FlutterEngine (#20399)" (flutter/engine#20550)
This reverts commit f69ea6f127181cb5578a3de58f96a58e183e4cdf.
2020-08-16 14:49:19 -07:00
stuartmorgan
f69ea6f127 [windows] Expose the binary messenger from FlutterEngine (flutter/engine#20399)
Makes BinaryMessenger available from FlutterEngine, rather than just the plugin registrar. This allows for method channels directly in applications without building them as plugins, and matches the other platforms.

Requires some restructuring of code and GN targets in the client wrappers to make the internals in the shared section usable by the implementations of platform-specific parts of the wrappers. Also fixes a latent issue with EnableInputBlocking symbols being declared but not defined for Windows that came up during testing of the restructuring.

Fixes https://github.com/flutter/flutter/issues/62871
2020-08-16 14:28:57 -07:00
Chris Yang
e6ebeb9e68 Only create raster_thread_merge when explicitly requested by the embedding platform (flutter/engine#20487) 2020-08-16 10:31:01 -07:00