3051 Commits

Author SHA1 Message Date
Robert Ancell
5e242e26b4 Add guards on FlValue methods to check for NULL values (flutter/engine#18226) 2020-05-14 09:02:51 +12:00
Chris Yang
a2b17f2993 Always keep thread merged when there are platform views. (flutter/engine#18245) 2020-05-13 08:53:46 -07:00
Robert Ancell
33d8ec80b3 Use 'message' as the parameter name in FlMessageCodec::encode_message (flutter/engine#18253)
This is more consistent with the Dart code.
2020-05-13 16:55:20 +12:00
LongCatIsLooong
1723142b9d add new keyboard types and missing autofill hints (flutter/engine#18202) 2020-05-11 19:41:46 -07:00
Robert Ancell
c617e2ecf5 Add FlStandardMessageCodec (flutter/engine#18213) 2020-05-12 11:09:21 +12:00
Robert Ancell
4058392714 Fix incorrect declaration of FlBinaryCodec (flutter/engine#18283) 2020-05-12 09:58:47 +12:00
Kaushik Iska
1acb5d4817 Fix latest_frame_target_time race (flutter/engine#18279)
There are some cases where onAnimatorDraw gets called before
onAnimatorBeginFrame, in these cases we need to update the
latest_frame_target_time to be the target time for the current frame.

This manifested as an issue in release mode Android builds:
https://firebase.corp.google.com/project/flutter-infra/testlab/histories/bh.27c33c672e9b01f2/matrices/4903344583855476919/executions/bs.ee4f6f7ad8671a34
2020-05-11 14:52:22 -07:00
Robert Ancell
b518809f2d Use the term 'handler' for registering callbacks. (flutter/engine#18269)
This is the term used in the Dart code and which callback is more commonly used
in GLib matching the Dart code will make developers life easier.
2020-05-12 09:01:10 +12:00
Robert Ancell
3e58d628c5 Fix grammar in FlBinaryCodec/FlStringCodec descriptions (flutter/engine#18268) 2020-05-12 09:00:36 +12:00
Marcus Tomlinson
7d5268265e Add new FlutterEngineAOTData argument to FlutterProjectArgs (flutter/engine#18146)
Added a new `FlutterEngineAOTData` argument to `FlutterProjectArgs`. Embedders can instantiate and destroy this object via the new `FlutterEngineCreateAOTData` and `FlutterEngineCollectAOTData` methods provided.

If an embedder provides more than one source of AOT data to `FlutterEngineInitialize` or `FlutterEngineRun` (e.g. snapshots as well as `FlutterEngineAOTData`), the engine will error out.

Resolves: https://github.com/flutter/flutter/issues/50778
2020-05-10 10:24:56 -07:00
Jason Simmons
9c611e4cb0 Restore the call to initConfig in FlutterLoader (flutter/engine#18257)
This was accidentally removed in https://github.com/flutter/engine/pull/18182
2020-05-09 11:49:11 -07:00
Gary Qian
7b4b9dea11 Add fullscreen padding workarounds to v2 android embedding (flutter/engine#18193) 2020-05-09 04:31:27 -07:00
Kaushik Iska
1785bb19b0 Revert "Remove pipeline in favor of layer tree holder (#17688)" (flutter/engine#18242) 2020-05-08 16:09:02 -07:00
Kaushik Iska
dee9634111 Remove pipeline in favor of layer tree holder (flutter/engine#17688)
go/flutter-pipeline-improvements for more details.
2020-05-08 10:51:10 -07:00
xster
d216d2e76f Make robolectric tests run against SDK 29 by default (flutter/engine#17996) 2020-05-07 23:29:02 -07:00
Robert Ancell
c23b125ec3 Add FlMessageCodec, FlBinaryCodec, FlStringCodec (flutter/engine#18186)
Classs for binary message encoding/decoding that matches the ones in the Flutter services library.
2020-05-08 16:13:54 +12:00
Robert Ancell
e85dbdde88 Add FlValue (flutter/engine#18185)
FlValue is a lightweight object used to contain the value types that Flutter
uses on platform channels.
2020-05-08 13:48:41 +12:00
stuartmorgan
b8d0673b3f Refactor GLFW embedding to support headless mode (flutter/engine#18205)
This does some long-overdue refactoring of the spaghetti code that grew in the GLFW embedding to begin providing a clearer separation between the engine and the window. It is now possible to register plugins, and run the runloop, on a headless engine, which makes headless mode much more usable. This is useful in some automated testing environments.

There is more refactoring that should be done in the future, but this is a good incremental point to stop as the PR is already large, and it provides useful new functionality as-is.
2020-05-07 17:10:11 -07:00
Kurun
663f1ddae5 Support EventChannel C++ plugin API for Linux/Windows (flutter/engine#17015)
Fixes https://github.com/flutter/flutter/issues/49398
2020-05-07 15:54:59 -07:00
Robert Ancell
2469d34922 Handle leak of message handle when no engine present (flutter/engine#18157)
* Handle leak of message handle when no engine present
* Move callback in wrong location
2020-05-08 09:05:20 +12:00
xster
5259bc09d4 add docs to platformviewios (and some drive-by changes) (flutter/engine#17593) 2020-05-07 14:01:09 -07:00
Jason Simmons
66a59e3138 Remove the global engine entry timestamp (flutter/engine#18182)
The engine was using a global to store a timestamp representing the
launch of the engine.  This timestamp is initialized with a JNI call
on Android and during shell setup on other platforms.  Later the
timestamp is added to a FlutterEngineMainEnter timeline event used to
measure engine startup time in benchmarks.

This PR removes the global and the JNI call and moves the timestamp
into the settings object.
2020-05-07 11:29:28 -07:00
Kaushik Iska
b1b1cea351 [profiling] CPU Profiling support for iOS (flutter/engine#18087)
See flutter.dev/go/engine-cpu-profiling for details
2020-05-07 08:11:07 -07:00
Wu Zhong
7dec4ba0a8 Fix memory leak of FlutterCustomAccessibilityAction (flutter/engine#17954) 2020-05-06 14:08:58 -07:00
Ali Mahdiyar
f1e911f717 Custom unicode handling for Android backspace via JNI to ICU (flutter/engine#17960) 2020-05-06 14:01:02 -07:00
Robert Ancell
10cf694c5a Add first Linux shell tests (flutter/engine#18159) 2020-05-06 15:33:11 +12:00
Chris Yang
906b86b159 [iOS platform view] fix active_composition_order_ never cleared (flutter/engine#18153) 2020-05-05 17:59:39 -07:00
Chris Yang
7a6448352f gpu_metal_surface submitframe return false when canvas is null (flutter/engine#18154) 2020-05-05 17:59:16 -07:00
Jason Simmons
e2907d3089 Remove the ResourceCleaner from the Android embedding (flutter/engine#18072) 2020-05-04 16:34:02 -07:00
Robert Ancell
984fddf8af Move G_END_DECLS that was in the wrong place (flutter/engine#18116) 2020-05-05 09:11:57 +12:00
Robert Ancell
af3071fe92 Support platform messages in Linux shell (flutter/engine#17995) 2020-05-04 17:03:04 +12:00
gabeschine
c7e19335c9 Update Fuchsia ComponentContext constructor call to renamed, but equvalent, method (flutter/engine#18067)
This change is part of an LSC in Fuchsia, and is a functionality no-op.

Fixes fxbug.dev/50759

Co-authored-by: Gabriel Schine <thatguy@google.com>
2020-05-01 15:04:58 -07:00
Gary Qian
c0ffda5aaf Revert "Remove Samsung workarounds (#17612)" (flutter/engine#18081)
This reverts commit 4dba845101dc6b01e9bf987d04cc97df48cc8368.
2020-05-01 13:14:27 -07:00
Chinmay Garde
efd2fd46aa Don't depend on an implicit transaction when presenting drawables on the raster thread. (flutter/engine#18076)
The way transactions were added changed in
8500bd4156.
This broke rendering using both Metal and OpenGL when no implicit transaction
was present on the transaction stack. The failure models differ based on Metal
vs. OpenGL and iOS/device versions. On older versions of iOS, rendering would
consume memory till exhaustion. On newer iOS versions, rendering would be stuck
(till a timeout). This patch brings transaction management back in line with as
it was earlier and also makes the Metal backend resilient to transactions being
present on the transaction stack at all. Since this is still quite brittle,
transaction management must be moved to IOSSurface as a followup.

Fixes https://github.com/flutter/flutter/issues/55784.
2020-05-01 13:05:23 -07:00
Chris Yang
d1d6103681 Introduce TaskRunnerChecker, TaskRunnerAffineWeakPtr (flutter/engine#17649) 2020-05-01 11:28:20 -07:00
Alexander Aprelev
4b5878c6ab Introduce runtime check that it is root isolate that makes UI native calls. (flutter/engine#18050)
* Revert "Do not register UI-related native functions in secondary isolates (#6401)"

This reverts commit c23deb818efc3813273d28ce7d965d0eb261cca9 as it doesn't work when root and secondary isolates run in the same isolate group.

* Confirm it is root isolate that makes UI native calls.

* Fix format, UIDartState reference from Fuchsia source

* No UI isolate check for fuchsia calls

* Fix typo. Remove redundant runtime calls
2020-05-01 09:05:41 -07:00
Felipe Archondo
fbdf852d1d [fuchsia] set vsync_offset based on config file (flutter/engine#18006)
In order to better support different products on Fuchsia, we should
change performance-sensitive attributes based on config files passed in.
This change does so for `vsync_offset`.
2020-05-01 08:45:53 -07:00
stuartmorgan
6027990460 Add an API for resyncing output streams (flutter/engine#18070)
When creating a console on Windows, stdout/stderr aren't wired up to it.
They need to be re-opened afeter the console is created, and that needs
to be done separately in the engine due to the use of static runtime
linking. This provides a helper method that the runner can call when
creating a console so that output will work as expected.

Part of https://github.com/flutter/flutter/issues/53169
2020-05-01 08:38:42 -07:00
George Wright
c64646b6e8 Bundle the validation layers and enable them if --enable-vulkan-validation-layers is specified to gn (flutter/engine#17854) 2020-04-30 16:06:59 -07:00
Kaushik Iska
9525672548 [fuchsia] Log unregistered platform channels only once (flutter/engine#18064)
This is to reduce log spam.

Fixes: https://github.com/flutter/flutter/issues/55966
2020-04-30 15:25:48 -07:00
Filip Filmar
604892e454 [fuchsia] Use dart::ComponentContext() (flutter/engine#17876)
This functionality is added in issue #41523.  Allows runners to request
the singleton instance of `sys::ComponentContext`, while it remains also
accessible to component-specific code that does not have direct access
to top-level objects.

Fixes #41523
2020-04-30 13:27:57 -07:00
Chris Yang
532f988f67 RendererContextManager (flutter/engine#17941) 2020-04-30 09:39:33 -07:00
Wings006
c65ab74a1c make "flutter run --trace-systrace" work. (flutter/engine#18052) 2020-04-30 09:30:24 -07:00
stuartmorgan
dda139248a Fix method handler control flow in Windows and Linux text input plugins (flutter/engine#17964)
The existing logic incorrectly factored out a check that there were arguments too early, applying it to any message not already handled (including unhandled methods, such as methods added after the initial implementation) and thus failing if any unhandled message had no arguments.

Fixes https://github.com/flutter/flutter/issues/55653
2020-04-29 19:43:12 -07:00
Chinmay Garde
d1acd32a82 [Metal] On context loss with a paused texture source, preserve external pixel buffer. (flutter/engine#18022)
Fixes https://github.com/flutter/flutter/issues/55783
Requires follow-up https://github.com/flutter/flutter/issues/55926
2020-04-29 13:27:00 -07:00
Robert Ancell
1523f9e550 Replace usage of NULL with nullptr to match coding style (flutter/engine#18023) 2020-04-29 13:26:27 -07:00
Robert Ancell
9d09f9ac4e Use g_warning instead of stderr (flutter/engine#17994) 2020-04-29 15:13:29 +12:00
George Wright
be852ec9a1 Set the max Vulkan API version when creating the GrContext (flutter/engine#18007) 2020-04-28 14:15:56 -07:00
Robert Ancell
c9b3285fa2 Run Flutter platform tasks in GLib main loop (flutter/engine#17910)
Fixes https://github.com/flutter/flutter/issues/54856
2020-04-29 09:13:58 +12:00
xster
62a64ac11e remove top padding when system UI in fullscreen mode (flutter/engine#17985) 2020-04-28 12:21:37 -07:00