3863 Commits

Author SHA1 Message Date
Jason Simmons
2e6866592d Release the JNI reference to the FlutterJNI class in GetDisplayRefreshRate (flutter/engine#29868)
See https://github.com/flutter/flutter/issues/93975
2021-11-20 13:00:11 -08:00
Andrei Diaconu
5003f1a91f Reland: Display Features support (flutter/engine#29585) 2021-11-19 18:04:31 -08:00
gaaclarke
7ab226eaf4 iOS Background Platform Channels (flutter/engine#29665) 2021-11-19 14:14:45 -08:00
gaaclarke
431731da40 Mentioned that replies can be invoked on any thread now that that is supported. (flutter/engine#29816) 2021-11-19 13:43:31 -08:00
David Worsham
40d0af4eb2 fuchsia: Fix Flatland opacity (flutter/engine#29844) 2021-11-19 11:58:20 -08:00
Jenn Magder
c08aa6c73d Add 'explicit' to darwin embedder constructors (flutter/engine#29827) 2021-11-19 10:54:29 -08:00
Dan Field
edb87942de Use eglPresentationTimeANDROID to avoid bogging down the GPU (flutter/engine#29727)
Fixes flutter/flutter#93352

Improves Android benchmarks on both Pixel 4 and a lower end Android Go device for 99th percentile and average raster times.

This works by telling the system compositor what timestamp we intended to show this frame for. This way, if we end up with a frame that gets submitted right at the beginning of a vsync and then a second frame submitted on the same vsync, the compositor will only try to show the second frame on the screen and save the GPU some work.

Without this, a situation like that results in an "avalanche" of calls where the GPU is behind the CPU and keeps delaying CPU work until we finally stop submitting frames. This can be observed as a lengthy dequeuBuffer in a systrace enabled trace, as shown in the linked issue. This avalanche is often triggered by a frame that does a shader compile through a couple vsyncs and then is followed by a bunch of very fast frames that take less than a vsync to render - the first of those fast frames gets delivered before the end of the vsync that the slow frame ended in.

We cannot implement this ourselves because we don't know how long the swap buffers call will take on the system side, and if we try to guess we can very well get it wrong.

I've filed issues to look into adding this for Vulkan and Metal, although we should also first take traces there to make sure it's warranted.

See also: https://android-developers.googleblog.com/2020/04/high-refresh-rate-rendering-on-android.html
2021-11-19 09:29:51 -08:00
Dan Field
3942c6c9f7 Make it less likely to GC during application startup on Android (flutter/engine#29825) 2021-11-18 22:22:22 -08:00
Jenn Magder
b39436f7e5 Fix darwin namespace-comments and brace lint issues (flutter/engine#29828) 2021-11-18 21:06:56 -08:00
Jenn Magder
5291ff4193 Add 'explicit' to Android embedder constructors (flutter/engine#29830) 2021-11-18 21:06:44 -08:00
ColdPaleLight
9ecd4c1899 Make FlutterEngineGroup support dart entrypoint args (flutter/engine#29096) 2021-11-18 18:08:03 -08:00
Tong Mu
5183c56533 [Embedder] Send key data through message channel (flutter/engine#29795)
This PR changes how embedder API's SendKeyData sends ui.KeyData to the framework. The packets are now sent over the existing platform messenger, reusing the entirety of its code path and functionalities while keeping the embedder API unchanged
2021-11-18 17:53:28 -08:00
Tong Mu
5077f867cf [Linux, Keyboard] Fix synthesization upon different logical keys (flutter/engine#29768)
This PR fixes an assertion error when the physical-logical map changes during key synthesization. This error will lead to irregular key sequences, and might occur during an extremely rare edge case described in the unit test in this PR.
2021-11-18 17:52:14 -08:00
Dan Field
0a6301d5ca Listen for display refresh changes and report them correctly (flutter/engine#29800)
This makes sure the frame timings recorder and vsync waiter implementations get
the correct refresh rate if or when it adjusts at runtime. This should be OK
because we'll only query the refresh rate when the display metrics actually
change, which is much less frequent than every frame. I experimented with an NDK
implementation in the previous patch, but that vastly restricts the API levels
we can support, and currently on API 30 and 31 it just calls Java methods
through JNI anyway.

I've refactored the way Display updates are reported so that AndroidDisplay can
just dynamically get the refresh rate correctly. These values are used by a
service protocol extension and by some Stopwatches on the CompositorContext.

See also #29765

Fixes flutter/flutter#93688
Fixes flutter/flutter#93698
2021-11-18 13:09:26 -08:00
Zachary Anderson
78d9e276e2 Fix some clang-tidy lints for Linux host_debug (flutter/engine#29734) 2021-11-18 13:08:01 -08:00
Niklas Schulze
1306ea59ec winuwp: Add multi-touch support (flutter/engine#28067) 2021-11-18 13:03:03 -08:00
Justin McCandless
3d60f36a21 TextEditingDelta Mac (flutter/engine#29036)
Enables the TextEditingDelta API for Mac, and abstracts iOS's TextEditingDelta class for multi-platfor reuse.
2021-11-18 08:44:44 -08:00
gaaclarke
99b17af458 Stopped creating the shell inside of a sync_switch when spawning. (flutter/engine#29798)
* Stopped creating the shell inside of a sync_switch when spawning.

* jason feedback
2021-11-17 17:34:48 -08:00
chunhtai
2a4d9bb696 Fixes the accessibilityContainer of FlutterScrollableSemanticsObject (flutter/engine#29771) 2021-11-17 17:01:31 -08:00
Jenn Magder
49d561e0e1 Fix "google-objc-*" clang analyzer warning in macOS and iOS (flutter/engine#29764) 2021-11-17 16:48:04 -08:00
godofredoc
44164d408e Revert 29789 revert 29542 freiling view ref (flutter/engine#29793) 2021-11-17 12:58:02 -08:00
Zachary Anderson
03c0f7e453 Add 'explicit' to header files (flutter/engine#29741) 2021-11-17 12:49:16 -08:00
Chris Bracken
dd669f3631 Acquire context reference at the correct time for FlGlArea. (flutter/engine#29791)
This is a reland of flutter/engine#29178 onto the main branch. The
original patch was landed on the master branch during the branch switch
from master to main.
2021-11-17 11:04:33 -08:00
Greg Spencer
a079a95ef7 Fix Kanji switch in Japanese IME on WIndows (flutter/engine#29761) 2021-11-16 19:08:01 -08:00
Brandon DeRosier
4136d0117f Enable Skia's Vulkan backend on all non-mobile platforms, and test SwiftShader Vulkan on all GL unittests platforms (flutter/engine#29520) 2021-11-16 15:27:25 -08:00
Ian Hickson
359f05e0e5 fix x64_64 typo in comments (flutter/engine#29731) 2021-11-13 21:45:31 -08:00
Brandon DeRosier
0d67e4e080 Use Fuchsia's Windows Clang SDK (flutter/engine#29736) 2021-11-13 21:22:55 -08:00
Jenn Magder
dbe42683b9 Fix 'google-readability-braces-around-statements' analyzer warning in macOS and iOS (flutter/engine#29723) 2021-11-12 18:42:29 -08:00
Greg Spencer
8c6d3d2492 Check for both compose string and result string. (flutter/engine#29620)
It turns out that unlike the Microsoft IME, Sogou sends a single IME_COMPOSITION message that has both the GCS_COMPSTR and GCS_RESULTSTR flags set, and we check for a composition string before result string, with an "else" clause to check for the result string, so if GCS_COMPSTR is set, we never check for a result string.
2021-11-12 14:55:28 -08:00
Jia Hao
a9005b330e Add test annotation (flutter/engine#29642) 2021-11-12 14:31:02 -08:00
Jenn Magder
bcce079911 Fix iOS embedder memory management and other analyzer warnings (flutter/engine#29623) 2021-11-12 13:16:01 -08:00
Wyte Krongapiradee
0a5dbbe522 Do not update system UI overlays when the SDK version condition is not met (flutter/engine#29643) 2021-11-11 12:29:31 -08:00
Rulong Chen(陈汝龙)
d0e356a496 WeakPtrFactory should be destroyed before any other members. (flutter/engine#29402) 2021-11-11 06:08:01 -08:00
Dan Field
72d93b0308 Remove outdated TODO (flutter/engine#29641)
I forgot to remove this when I fixed the bug.
2021-11-10 11:22:16 -08:00
Jason Simmons
fda46d0aff Use -linkoffline to provide the Android Javadoc package list (flutter/engine#29629) 2021-11-10 11:18:02 -08:00
Alexander Biggs
b1e43d9b6c [fuchsia] Move TODOs for Dart v2 to specific bugs. (flutter/engine#29632) 2021-11-10 12:52:38 -05:00
gaaclarke
4dc52a2e91 Share the GrContext between lightweight engines (flutter/engine#28809) 2021-11-09 13:23:38 -08:00
Chris Bracken
1e13b1171d Fix UB in semantics updates (flutter/engine#29621)
Several arrays pointers on semantics update objects were being passed as
the address of the 0th element; however, this is UB in the case where
the array length is 0.

We already test for this in embedder_a11y_unittests.cc and the
associated fixture:
78a2941957/shell/platform/embedder/fixtures/main.dart (L182-L184)

We didn't catch this since we don't currently run the embedder tests on
Windows.

Issue: flutter/flutter#93338
2021-11-09 13:03:56 -08:00
Ben Butterworth
9c5557e8f7 Call didFailToRegisterForRemoteNotificationsWithError delegate methods in FlutterPlugin (flutter/engine#28609) 2021-11-09 12:58:01 -08:00
Emmanuel Garcia
63ef8c0480 Call Dart messenger methods in DartExecutor (flutter/engine#29599) 2021-11-08 17:57:31 -08:00
Emmanuel Garcia
b2eb38f7de Add default implementations to new methods added to BinaryMessenger (flutter/engine#29596) 2021-11-08 17:32:31 -08:00
Chris Yang
728f8e61a4 [ios_platform_view, a11y] Make FlutterPlatformViewSemanticsContainer a SemanticsObject. (flutter/engine#29531) 2021-11-08 11:52:31 -08:00
Jami Couch
1d3165a31c Support Scribble Handwriting (flutter/engine#24224) 2021-11-08 10:39:17 -08:00
gaaclarke
6a7b4f5f65 Implemented concurrent TaskQueues (flutter/engine#29491) 2021-11-08 10:11:54 -08:00
WenJingRui
bb7e8ec6c2 [iOS] Support keyboard animation on iOS (flutter/engine#29281) 2021-11-08 10:03:20 -08:00
Zachary Anderson
9dffe2d4f6 Revert "Reland Display Features support (Foldable and Cutout) (#29447)" (flutter/engine#29574)
This reverts commit 28a1c9b21b205a436fad64c9d0bced6b22b4b6a3.
2021-11-06 20:43:44 -07:00
Dan Field
afa85c0173 Hide a11y elements when resigning active (flutter/engine#29566) 2021-11-06 13:25:42 -07:00
Emmanuel Garcia
69ac1ed4dc Fix race condition introduced by background platform channels (flutter/engine#29377) 2021-11-05 15:35:43 -07:00
Tong Mu
d4d9c2aa4d [Linux keyboard] Fix logical keys of up events are not regularized (flutter/engine#29550)
This PR fixes a bug where up events from the embedder responder are not using the logical keys of the down events, breaking the regularization
2021-11-05 13:56:23 -07:00
Wu Zhong
3c312fda77 [iOS] Fixes press key message leaks (flutter/engine#29354) 2021-11-05 00:18:01 -07:00