3875 Commits

Author SHA1 Message Date
Gary Qian
9e1a29d21c Revert "Listen for Vsync callback on the UI thread directly" (flutter/engine#29923) 2021-11-24 12:33:02 -08:00
Emmanuel Garcia
93e6dbe5ab Bump androidx.window:window-java (flutter/engine#29897) 2021-11-24 11:41:40 -08:00
eggfly
d18f5c8223 Reset viewport_metrics when spawn new Engine (flutter/engine#29876)
Co-authored-by: zsunkun <zsunkun@163.com>
2021-11-24 09:49:08 -08:00
Fei Zhang
c45a9152a8 Listen for Vsync callback on the UI thread directly (flutter/engine#29889) 2021-11-24 04:23:01 -08:00
Alexander Biggs
54cd63841e [fuchsia] Add arg for old_gen_heap_size. (flutter/engine#29875) 2021-11-22 22:13:01 -08:00
ColdPaleLight
742a3dc7d8 Remove the dart entry point args from the Settings struct (flutter/engine#29831) 2021-11-22 18:43:02 -08:00
Alexander Biggs
b6f5e8e868 [fuchsia] Point TODOs off closed bug. (flutter/engine#29634) 2021-11-22 17:33:03 -08:00
Wu Zhong
d50c0bcca8 [iOS] Destroy the engine prior to application termination. (flutter/engine#29295) 2021-11-22 17:28:03 -08:00
Tong Mu
0a7630373d [Embedder Keyboard] Fix synthesized events causing crash (flutter/engine#29854) 2021-11-22 15:38:02 -08:00
WenJingRui
b4058bb068 [iOS] Fix:Keyboard inset is not correct when presenting and native ViewController on FlutterViewController (flutter/engine#29862) 2021-11-22 15:27:56 -08:00
Alexander Biggs
e90740bcc8 [fuchsia] Don't use sys.Environment in V2. (flutter/engine#29867) 2021-11-22 11:03:04 -08:00
Chris Bracken
29fd771d30 Extract AccessibilityBridge::kRootNodeId (flutter/engine#29856)
The ID of the root semantics node in Flutter's semantics tree is always
0. Since we'll be adding support for Windows, extract this constant to a
common location.
2021-11-22 10:08:31 -08:00
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