1374 Commits

Author SHA1 Message Date
ColdPaleLight
975d330db0 Implemented library uri support for FlutterFragmentActivities (flutter/engine#30790) 2022-01-11 09:33:17 -08:00
gaaclarke
379651ad4f Implemented library uri support for FlutterFragments and FlutterActivities (flutter/engine#30726)
* Implemented library uri support for FlutterFragments and FlutterActivities.

* added docstrings

* emmanuel feedback
2022-01-10 14:21:21 -08:00
eggfly
ea4b23242b [android] Remove the FlutterView casting, add a @NonNull and fix code style (flutter/engine#30734) 2022-01-10 12:50:10 -08:00
Emmanuel Garcia
d81c472076 Remove glitch when displaying platform views (flutter/engine#30724) 2022-01-10 11:25:06 -08:00
utzcoz
3e3ec2f1c7 Bump Robolectric to 4.7.3 (flutter/engine#30437) 2022-01-06 18:25:09 -08:00
gaaclarke
201909edd4 Removed "UiThread" annotation from MethodChannel#Result. (flutter/engine#30671) 2022-01-04 13:06:40 -08:00
eggfly
8d18d929e5 [android] Provide a path instead of throwing NPE when getDir() suites returns null (flutter/engine#30367) 2021-12-16 22:09:09 -08:00
Igor Cota
3ce5370e35 maybeGetInitialRouteFromIntent: check if URI data getPath() is null (flutter/engine#29766) 2021-12-16 13:09:13 -08:00
Emmanuel Garcia
522e4f06b6 Keep a single source of truth for embedding dependencies (flutter/engine#30359) 2021-12-15 23:39:02 -08:00
Jim Graham
46a8def326 Opacity peephole optimization (flutter/engine#29775) 2021-12-14 16:19:09 -08:00
Dan Field
b38b90c039 Revert "Fix eglPresentationTimeANDROID is no effective" (flutter/engine#30310)
* Revert "Fix eglPresentationTimeANDROID is no effective (#30182)"

This reverts commit 0d7ba05d3456807e7e24353fe911738952a02888.

* Revert "Use eglPresentationTimeANDROID to avoid bogging down the GPU (#29727)"

This reverts commit edb87942de0404a2802351c050a4f1b6de239bd7.
2021-12-13 20:02:20 -08:00
Marcel Kirchhoff
f27c7836eb Fix typo in jni registration (flutter/engine#30282) 2021-12-12 18:14:09 -08:00
MiracleSoul
0d7ba05d34 Fix eglPresentationTimeANDROID is no effective (flutter/engine#30182)
* Fix eglPresentationTimeANDROID is no effective

* Update android_environment_gl.cc

Co-authored-by: Dan Field <dfield@gmail.com>
2021-12-10 11:05:25 -08:00
Emmanuel Garcia
dceed9cd73 Migrate to Mockito 4.1.0 (flutter/engine#30257) 2021-12-10 10:19:10 -08:00
chunhtai
95eab38132 Android accessibility bridge also fire selection change event when it predict selection change. (flutter/engine#30199) 2021-12-10 10:04:08 -08:00
Rulong Chen(陈汝龙)
915625716a [android] Fix unexpected behavior in |detachFromFlutterEngine|. (flutter/engine#30202) 2021-12-09 10:44:04 -08:00
eggfly
d459933b42 [Android] Fix mEditable NullPointerException in TextInputPlugin (flutter/engine#30145) 2021-12-08 20:19:05 -08:00
eggfly
fdfdd6dccb Fix embedder_->EndFrame() not called in case of DrawLastLayerTree() (flutter/engine#29979) 2021-12-05 06:59:01 -08:00
Emmanuel Garcia
0849c0ecd7 Fix cast in FlutterView (flutter/engine#30106) 2021-12-03 15:54:01 -08:00
Emmanuel Garcia
cc8debdc54 Close image reader when the resource is unreachable (flutter/engine#30089) 2021-12-02 16:29:01 -08:00
陈昱
30c4de0797 Make fragment leftover from an attach/detach race slightly safer (flutter/engine#29908) 2021-12-02 13:19:01 -08:00
Emmanuel Garcia
f0d3d31b08 Use WindowInfoTracker.Companion.getOrCreate instead of the short version (flutter/engine#30012) 2021-11-30 17:24:01 -08:00
eggfly
b87bbe9bc9 Fix typo and clean some includes (flutter/engine#29940) 2021-11-29 09:34:38 -08:00
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
Fei Zhang
c45a9152a8 Listen for Vsync callback on the UI thread directly (flutter/engine#29889) 2021-11-24 04:23: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
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
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
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
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
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
Zachary Anderson
03c0f7e453 Add 'explicit' to header files (flutter/engine#29741) 2021-11-17 12:49:16 -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
Jia Hao
a9005b330e Add test annotation (flutter/engine#29642) 2021-11-12 14:31:02 -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
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
gaaclarke
4dc52a2e91 Share the GrContext between lightweight engines (flutter/engine#28809) 2021-11-09 13:23:38 -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
gaaclarke
6a7b4f5f65 Implemented concurrent TaskQueues (flutter/engine#29491) 2021-11-08 10:11:54 -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
Emmanuel Garcia
69ac1ed4dc Fix race condition introduced by background platform channels (flutter/engine#29377) 2021-11-05 15:35:43 -07:00
Andrei Diaconu
28a1c9b21b Reland Display Features support (Foldable and Cutout) (flutter/engine#29447) 2021-11-04 13:45:46 -07:00
Jason Simmons
84a29d044f Provide a default handler for the flutter/navigation channel (flutter/engine#29511) 2021-11-04 07:43:02 -07:00