2653 Commits

Author SHA1 Message Date
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
gaaclarke
df17cc6ccf Started stubbing in the FlutterView property of the mock (flutter/engine#20542)
FlutterViewControllers.
2020-08-15 21:03:20 -07:00
David Worsham
ad2bff1014 Reland: "fuchsia: Remove dead code / break dependencies" (flutter/engine#20532)
Reland #19396 with a fix for improper scale that was affecting internal tests

Tested: Ran all unittests, ran internal tests, and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-14 20:41:18 -07:00
Emmanuel Garcia
a87eaedcc2 Create PlatformView instance right after method channel call from Dart (flutter/engine#20500) 2020-08-14 15:06:02 -07:00
Diego Ballesteros Villamizar
4ba82d4d91 Handle glfwGetPrimaryMonitor returning nullptr (flutter/engine#20523)
* Handle glfwGetPrimaryMonitor returning nullptr

[glfwGetPrimaryMonitor](https://www.glfw.org/docs/3.3/group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1) may return NULL in non-error cases when no monitor is found. This started to happen recently with an update to the linux distribution, see internal b/162545223.

Handling this case avoids a crash and instead assumes a pixel density.
2020-08-14 23:03:50 +02:00
gaaclarke
6ac18e9203 Fixed the accessibility ios unit tests by sending in mock view (flutter/engine#20522)
controllers instead of views.
2020-08-14 10:42:21 -07:00
Justin McCandless
1fec9ca767 hasStrings on Android (flutter/engine#20393)
hasStrings message for checking for pasteable clipboard contents without actually reading them, for iOS14 clipboard alerts.
2020-08-14 08:45:18 -07:00
stuartmorgan
7e9b115eeb Fix the legacy EncodableValue codepaths (flutter/engine#20501)
A recent refactoring broke the USE_LEGACY_ENCODABLE_VALUE codepath in
standard_codec.cc, which went unnoticed since it wasn't being compiled.
This fixes the breakage, and also adds a temporary minimal unit test
target that ensures that all the USE_LEGACY_ENCODABLE_VALUE paths are
being compiled.
2020-08-13 23:02:20 -07:00
Jia Hao
89e5cf3dba Add missing nullable annotation (flutter/engine#20505) 2020-08-13 22:41:01 -07:00
Yuqian Li
4dec444c69 Add a service protocol for raster cache memory (flutter/engine#20466)
Related issue: https://github.com/flutter/flutter/issues/56719
2020-08-13 20:11:47 -07:00
David Worsham
877ae98e08 Fix unoptimized fuchsia builds (flutter/engine#20488) 2020-08-13 16:12:04 -07:00
Dan Field
b43d17a5a3 Remove the dummy rasterizer delegate now that flutter_runner is in tree, and cleanup ctor params (flutter/engine#20486) 2020-08-13 14:46:01 -07:00
xster
5ac78f5be6 Refactor initial route code take 2 (flutter/engine#20468) 2020-08-13 14:18:11 -07:00
Mehmet Fidanboylu
0f611fe4b7 Plumbing for setting domain network policy (flutter/engine#20218) 2020-08-13 07:26:43 -07:00
stuartmorgan
3d63be5265 Send locale information in the macOS embedding (flutter/engine#20461)
Queries the system list of user-preferred languages, and sends it to the
engine just after starting it up, as well as after any OS locale change.

macOS portion of https://github.com/flutter/flutter/issues/45152
2020-08-12 19:31:22 -07:00