3014 Commits

Author SHA1 Message Date
freiling
879027fc8f Freiling warmup memory (flutter/engine#22984)
* [fuchsia] enable boot time shader warmup even when LEGACY_FUCHSIA_EMBEDDER is defined

* [fuchsia] decouple shader warmup from embedder api

* [fuchsia] change warmup context flush() to flushAndSubmit() to reduce memory footprint of warmup

* [fuchsia] Fix GPU resource lifecycle issue with shader warmup

This fixes an issue with the shader warmup where gpu resources could end
up deleted before the gpu work that needed them was complete, leading to
GPU page faults. This was because although the sk_sp<SkSurface> will normally
keep resources alive throughout its lifetime, the SurfaceProducerSurface will
call VkDestroyMemory on the memory backing the SkSurface when it is deleted,
even if the SkSurface wrapping that VkMemory is still alive.

This change also deletes some related but unused code from
CompositorContext that I noticed while refactoring.
2020-12-10 15:27:44 -08:00
Jenn Magder
25c323c982 Load iOS dart bundle by URL fallback (flutter/engine#22997) 2020-12-10 14:43:02 -08:00
Dan Field
2d52a3c87c Set SkPath::setIsVolatile based on whether the path survives at least two frames (flutter/engine#22620)
This patch defaults the volatility bit on SkPaths to false, and then flips it to true if the path survives at least two frames.
2020-12-10 13:57:23 -08:00
Chase Latta
b2f8531baf add ffi_struct_patch.dart to libraries.yaml (flutter/engine#23000) 2020-12-10 13:32:49 -08:00
Jenn Magder
99bfdc65ed Load macOS dart bundle by URL fallback (flutter/engine#22979) 2020-12-10 12:50:58 -08:00
Robert Ancell
f128a93e70 Replace g_object_weak_ref with g_object_add_weak_pointer
In these cases it is simpler to use the latter. Newer code is using this method.
2020-12-11 09:07:26 +13:00
Gary Qian
19afd06afc Add split AOT loading unit failure/error code path (flutter/engine#22857) 2020-12-08 22:58:01 -08:00
Jason Simmons
5c65e278dd Move the WindowInsetsAnimation.Callback implementation to an inner class to avoid Android class loader warnings (flutter/engine#22916) 2020-12-08 12:38:02 -08:00
Robert Ancell
516165af02 Stop potential lockup due to GHashTable being modified when cleared. (flutter/engine#22917)
This doesn't seem to be currently occuring, but I triggered such a lockup
when modifying other code.
2020-12-09 07:26:35 +13:00
Chris Yang
3dfa731239 Enable clipRRect for android platform view hybrid composition (flutter/engine#21817) 2020-12-08 09:13:02 -08:00
ftsui
9b308bf473 Allow the root layout to be overriden. (flutter/engine#22887)
a
2020-12-07 14:15:45 -08:00
James Clarke
bf3c427990 Windows: Add UWP target stub [Flutter#14697] (flutter/engine#21754) 2020-12-06 11:03:02 -08:00
mikerreed
f5cb178122 Update sites to use new SkMatrix factories (flutter/engine#22871)
SkMatrix is deprecating some of its factories. This must moves flutter tests to the new ones.

No expected change in runtime.
2020-12-04 12:05:42 -05:00
xster
7d33d45094 Handle null platform plugin delegate for v1 embedding (flutter/engine#22853) 2020-12-03 16:38:03 -08:00
mikerreed
37b2722631 opt into new Skia APIs (flutter/engine#22845) 2020-12-03 15:28:02 -08:00
Chris Bracken
d7804003d4 Fix NPE when platform plugin delegate is null (flutter/engine#22852)
Adds a null check before dereferencing in
PlatformPlugin.popSystemNavigator. platformPluginDelegate is allowed to
be null, as it is in the PlatformPlugin(Activity, PlatformChannel)
constructor.
2020-12-03 15:22:34 -08:00
zljj0818
0ef14f3ca3 More rename from GPU thread to raster thread (flutter/engine#22819) 2020-12-03 15:03:02 -08:00
Greg Spencer
49935d5547 Add delayed event delivery for Linux. (flutter/engine#22577)
This changes the text handling so that keyboard events are sent to the framework first for handling, and then passed to the text input plugin, so that the framework has a chance to handle keys before they get given to the text field.

This is complicated by the async nature of the interaction with the framework, since GTK wants a synchronous response. So, in this change, I always tell GTK that the event was handled, and if it wasn't, then I re-dispatch the event once we know one way or the other.
2020-12-03 15:00:37 -08:00
Richard Cai
cb35e23e34 (MacOS) Add FlutterGLCompositor with support for rendering multiple layers (flutter/engine#22782)
* Create FlutterGLCompositor.
* Add additional state to manage frame status and CALayers to FlutterGLCompositor

FlutterGLCompositor supports rendering multiple layers. The first layer is rendered using the FlutterView. Additional CALayers are created if there is more than one layer.

Platform view support will be added in following PR.
2020-12-03 11:57:15 -05:00
Greg Spencer
7e51be2917 Reland: "Fix race condition in key event handling on Android (#22658)" (flutter/engine#22834) 2020-12-03 08:53:02 -08:00
Gary Qian
9352ed557e Split AOT Engine Runtime (flutter/engine#22624) 2020-12-02 13:28:01 -08:00
Jason Simmons
111a924c83 Generate Maven metadata files for engine artifacts (flutter/engine#22685) 2020-12-02 12:43:01 -08:00
Greg Spencer
5e89debe49 Revert "Fix race condition in key event handling on Android (#22658)" (flutter/engine#22823)
This reverts commit dee9413 (#22658) because it breaks some Google tests. Will investigate and re-land.
2020-12-02 12:03:48 -08:00
Kaushik Iska
b6daee84ec Reland "Introduce a delegate class for gpu metal rendering (#22611)" (flutter/engine#22777)
This reverts commit 0d71d27aa7d9058841bbba104021927c7f17b7ce.
2020-12-02 13:04:10 -06:00
Kaushik Iska
9d46f7efef [embedder] Compositor can specify that no backing stores be cached (flutter/engine#22780) 2020-12-02 13:01:46 -06:00
Jonah Williams
bc13e87a05 add trace kernel flag to allowlist (flutter/engine#22812) 2020-12-02 09:49:04 -08:00
chunhtai
7c9c91cf02 Add static text trait to plain semantics object with label in iOS (flutter/engine#22811)
* Add static text trait to plain semantics object with label in iOS

* update

* format
2020-12-02 09:32:35 -08:00
Greg Spencer
dee94135d4 Fix race condition in key event handling on Android (flutter/engine#22658)
This fixes a problem in Android key event handling where, because I was only using a single bool to indicate that we were re-dispatching, there was a race condition when multiple keys were pending (sent to the framework, awaiting responses).

This fixes that by switching to a mechanism that uses the event itself to tell if it was redispatched.

In doing this, I realized that because key events can come from either the dispatchEvent call, or through the InputConnectionAdaptor, I needed to handle both routes properly so that the events would all be handled, and all go through the same mechanism on the framework side.
2020-12-01 09:42:38 -08:00
Gary Qian
05927cf60d Add FlutterPlayStoreSplitApplication for simpler opt in to Split AOT (flutter/engine#22752) 2020-11-30 19:27:44 -08:00
chandarrengoog
ad017544f3 Cleanup dart_runner examples & tests. (flutter/engine#22769) 2020-11-30 12:48:02 -08:00
Kaushik Iska
7d69fda39b Revert "Introduce a delegate class for gpu metal rendering (#22611)" (flutter/engine#22775)
This reverts commit 98f761acf90de8b60127ab0e7236d60866cb13e4.
2020-11-30 14:47:01 -06:00
xster
fd77ecc84c Let FlutterFragment not pop the whole activity by default when more fragments are in the activity (flutter/engine#22692) 2020-11-30 12:43:03 -08:00
Jason Simmons
567590484f Fix the unchecked conversion warning for searchPaths in PlayStoreDynamicFeatureManager (flutter/engine#22654)
Also use the diamond operator throughout this class.
2020-11-30 12:23:09 -08:00
David Worsham
135b5f5504 fuchsia: Ensure full-screen input interceptor (flutter/engine#22687) 2020-11-25 19:10:29 -08:00
Kaushik Iska
98f761acf9 Introduce a delegate class for gpu metal rendering (flutter/engine#22611) 2020-11-25 15:46:38 -06:00
Andy Weiss
ebdd79df0d [embedder][glfw] Add support for locales to glfw shell (flutter/engine#22657)
The other linux shell (and all the other embedding) have support for
getting the locales from the system and sending them over the
flutter/localization channel. The glfw shell does not have that which is
causing a crash on an assert now that Locale is no longer nullable
in Platform.

This adds a similar approach to what is going on over in the other linux
shell.
2020-11-24 14:23:12 -08:00
Brian Osman
2260bb3fd7 Fix use of uninitialized memory in animator (flutter/engine#22714)
* Fix use of uninitialized memory in animator

Discovered via MSAN build of embedder_unittests
2020-11-24 14:51:31 -05:00
stuartmorgan
79b158833b Add initial settings message to Windows embedding (flutter/engine#22323)
Sends the flutter/settings update message to the engine after starting
it. For now values other than 24-hour time preference are hard-coded,
but dark mode support can be added later.

Fixes https://github.com/flutter/flutter/issues/65590
2020-11-23 15:58:45 -08:00
Chris Yang
4f25c151f3 Fix shell_unittests flakes related to external_view_embedder (flutter/engine#22683) 2020-11-23 15:48:03 -08:00
Richard Cai
4201a76d36 Create a wrapper for IOSurface to handle creation and (flutter/engine#22663)
binding IOSurfaces to textures / framebuffers.
2020-11-23 15:32:07 -05:00
Richard Cai
4c16b3f5ef Create FlutterFrameBufferProvider class. (flutter/engine#22656) 2020-11-21 08:43:04 -08:00
Jason Simmons
ec51a006fe Make AndroidContext::IsValid virtual (flutter/engine#22665)
Fixes https://github.com/flutter/flutter/issues/70938
2020-11-21 07:51:39 -08:00
Gary Qian
b29a73b5dc Fix java warnings for unchecked conversions in PlayStoreDynamicFeatureManager (flutter/engine#22628) 2020-11-20 13:37:26 -08:00
Greg Spencer
5c883e2293 Fix double delete on backspace on Android (flutter/engine#22626) 2020-11-20 10:43:02 -08:00
freiling
fa9001447d [fuchsia] shader warmup fixes (flutter/engine#22439)
This change contains a couple of changes that should have been in
github.com/flutter/engine/commit/4903a92b2b16e480c486965f6c102f335f1a4ecb
but fell through the cracks

First one lifts the initialization of the flutter::RunConfiguration so that
the asset manager gets set on the persistant cache before the shader
warmup happens. I'm not sure how this didnt end up in the first PR I
think it got mangled during merge conflict resolution. no test coverage
for that code because its in the middle of a 400 line constructor

Second one fixes a race condition that the tests dont catch because the
tests are single threaded. This change restructures the test that missed
this bug so that it would have caught that bug and will catch comparable
bugs.
2020-11-19 19:46:13 -08:00
Gary Qian
3676366194 Split AOT Android Embedder and shell (flutter/engine#22179) 2020-11-19 17:22:26 -08:00
Ari Weiland
bd40f31603 Update the tag for FlutterEngineConnectionRegistry to be 23 characters. (flutter/engine#22610) 2020-11-19 12:06:56 -08:00
Emmanuel Garcia
dba50d32e6 Replace support libraries for AndroidX (flutter/engine#22598) 2020-11-19 10:08:02 -08:00
Chris Yang
ffad39e000 PlatformViewsController: clear composition_order_ in the beginning of each frame. (flutter/engine#22574) 2020-11-19 09:53:03 -08:00
Gary Qian
7a18791454 Rename padding->viewPadding to match framework naming conventions (flutter/engine#22599) 2020-11-19 09:50:51 -08:00