2282 Commits

Author SHA1 Message Date
William Wold
1a034bde75
Replace FlRenderer::get_visual() with more generic FlRenderer::setup_window_attr() (#20833) 2020-08-28 14:31:34 +12:00
William Wold
dcb9244c38
Consolidate FlRenderer initialization into fl_renderer_start() (#20763) 2020-08-28 09:57:14 +12:00
Mehmet Fidanboylu
569fd19357
Reland "Pass platform configuration to Dart VM for insecure socket policy (#20733)"
This reverts commit 77dd1c05b99d137b5b348598f69ec75c93e0a433.
2020-08-27 14:23:31 -07:00
Jason Simmons
fc4da62b8c
Ignore calls to AccessibilityBridge listeners after release (#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
77dd1c05b9
Revert "Pass platform configuration to Dart VM for insecure socket policy (#20733)" (#20812)
This reverts commit d241105d7a840a7ba88bc2c0ce4a9f415f83aaab.
2020-08-27 08:23:30 -07:00
Gary Qian
93f17e9ea6
Use Android R (API 30) getInsets() to compute padding (#18339) 2020-08-26 18:15:40 -07:00
Kaushik Iska
1892e031f2
[embedder] Add gl present callback that takes present info (#20672) 2020-08-26 15:53:01 -07:00
chunhtai
8308b6ad8c
Avoid passing nil to IOS accessibility announcement (#20700) 2020-08-26 10:38:03 -07:00
Emmanuel Garcia
45f09403d8
Fix EGL_BAD_SURFACE when app is paused (#20735) 2020-08-25 12:39:40 -07:00
Dan Field
4a88d5e109
Revert hint_freed (#20746)
This caused over-aggressive GCs, which vastly increased CPU usage benchmarks.

* Revert "fix build (#20644)"

This reverts commit b59793ee20be29463fac7a79635bf20253f04107.

* Revert "Hint freed (#19842)"

This reverts commit 3930ac1b25820baee3c67d921a0b009606cb3dae.
2020-08-25 11:55:40 -07:00
Mehmet Fidanboylu
d241105d7a
Pass platform configuration to Dart VM for insecure socket policy (#20733) 2020-08-25 10:56:03 -07:00
Maksim Lin
57fdf0a1fb
send newline char when input type is multiline (#20660) 2020-08-25 10:51:02 -07:00
Emmanuel Garcia
4de62c7c26
Revert "Enable hybrid composition by default on Android (#20722)" (#20745)
This reverts commit d16ba48e1d79cf0197e96c51c38300ee921baeb0.
2020-08-25 09:54:13 -07:00
Emmanuel Garcia
d16ba48e1d
Enable hybrid composition by default on Android (#20722) 2020-08-24 13:10:23 -07:00
Chris Yang
1c13abaab1
The ForwardingGestureRecognizers to have back reference to the PlatformViewsController so it can access FlutterViewController when its available (#20708) 2020-08-24 12:41:02 -07:00
Chinmay Garde
9939c26bd2
Fix race condition and data race in FrameInfoContainsValidWidthAndHeight. (#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
b6cb1f13dd
Update view attributes after creation (#20638) 2020-08-22 12:46:04 -07:00
LI DONGZE
da5eb26b5d
Reporting back native stacktrace to dart side for crash reporting. (#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
b6035062ff
Enable ios platform view by default (#20671) 2020-08-20 17:46:01 -07:00
stuartmorgan
498dbc6dc1
[windows] Mostly eliminate the state structs (#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
38a302960f
All shape related structs are together (#20665) 2020-08-20 15:21:02 -07:00
stuartmorgan
60b8d00865
Use references for C++ MethodResult and EventSink (#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
4dc866283d
fuchsia: Convert legacy permutations to build flag (#20647) 2020-08-19 19:09:51 -07:00
James Clarke
89f506ed62
Fix flutter#40068 Redraw issues on resize/minimize/maximize on Windows and startup in release (#20357)
* Fix redraw issues

* Address CR feedback.

* Fix build

* CR feedback
2020-08-19 16:19:09 -07:00
Kaushik Iska
26fe9125b5
[embedder] Add FBO callback that takes frame info (#20617) 2020-08-19 16:06:02 -07:00
Jason Simmons
d41e10bd75
Release the AccessibilityBridge when destroying a legacy FlutterView (#20610) 2020-08-19 14:11:02 -07:00
chunhtai
ccaee70b05
Missing default focus when navigating to a page with no SemanticsNode that sets namesRoute:true (#20516) 2020-08-19 14:06:03 -07:00
Dan Field
3930ac1b25
Hint freed (#19842)
* Hint the VM when a layer or picture goes out of scope
2020-08-19 14:04:31 -07:00
egdaniel
8540e001ea
Remove use of ctors on Skia Vulkan struct (#20630)
Skia is removing the ctors on these structs so removing them.
2020-08-19 13:18:25 -04:00
Stas Parshin
8177937133
Fix NPE in PlatformViewsController.checkInputConnectionProxy (#20622) 2020-08-19 08:34:04 -07:00
Chris Yang
e7136c3f59
Ensure threads are merged when tearing down the Rasterizer (#19919) 2020-08-19 08:31:01 -07:00
stuartmorgan
dcbe3d3d3d
[windows] Allow delegation of top-level WindowProc (#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
Chase Latta
17e1ae4318
convert zircon and fuchsia to null-safety (#20577) 2020-08-18 13:15:00 -07:00
Emmanuel Garcia
615679865a
Reland: Create PlatformView instance right after method channel call from Dart (#20568) 2020-08-17 16:28:15 -07:00
gaaclarke
7b9ac278c9
Revert "Create PlatformView instance right after method channel call from Dart (#20500)" (#20564)
This reverts commit 9333b7c1d0ac7b2ae97998df116fcb0f99b1f26f.
2020-08-17 11:17:03 -07:00
stuartmorgan
9060913dc9
Send locale information in the Windows embedding (#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
32b1b70e27
[windows] Expose the binary messenger from FlutterEngine (#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
3aff256928
Enable iOS plumbing for network security and add tests (#20492) 2020-08-16 21:20:26 -07:00
stuartmorgan
3ebcde6a17
Revert "[windows] Expose the binary messenger from FlutterEngine (#20399)" (#20550)
This reverts commit 7fa21a45a64b1a4a642c57bb81d7f3bd67cd5f5e.
2020-08-16 14:49:19 -07:00
stuartmorgan
7fa21a45a6
[windows] Expose the binary messenger from FlutterEngine (#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
ac8175fee1
Only create raster_thread_merge when explicitly requested by the embedding platform (#20487) 2020-08-16 10:31:01 -07:00
gaaclarke
f60e836968
Started stubbing in the FlutterView property of the mock (#20542)
FlutterViewControllers.
2020-08-15 21:03:20 -07:00
David Worsham
5a2bf6aa4c
Reland: "fuchsia: Remove dead code / break dependencies" (#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
9333b7c1d0
Create PlatformView instance right after method channel call from Dart (#20500) 2020-08-14 15:06:02 -07:00
Diego Ballesteros Villamizar
169b22cda2
Handle glfwGetPrimaryMonitor returning nullptr (#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
0cda2931e5
Fixed the accessibility ios unit tests by sending in mock view (#20522)
controllers instead of views.
2020-08-14 10:42:21 -07:00
Justin McCandless
33015c6c7a
hasStrings on Android (#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
84aa365680
Fix the legacy EncodableValue codepaths (#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
9c99bf7587
Add missing nullable annotation (#20505) 2020-08-13 22:41:01 -07:00
David Worsham
da3c9ff53c
Fix unoptimized fuchsia builds (#20488) 2020-08-13 16:12:04 -07:00