3051 Commits

Author SHA1 Message Date
najeira
cd5ceb29be Fix NullPointerException in SurfaceTextureRegistryEntry (flutter/engine#7837) 2019-02-15 13:01:41 -08:00
najeira
a3e6ae8948 Fix NullPointerException in ResourceCleaner (flutter/engine#7838) 2019-02-15 12:56:37 -08:00
Ben Konyi
640bed91e3 Add support for calling into other plugins from a background context on iOS (flutter/engine#7843)
Added `FlutterPluginRegistrantCallback` typedef and optional `setPluginRegistrantCallback` static method in `FlutterPlugin`. `setPluginRegistrantCallback` is used to set a callback defined in AppDelegate.m which registers some subset of plugins with a `FlutterPluginRegistry` (for example, a headless FlutterEngine). This allows for plugins which utilize background execution functionality to enable the use of other plugins on the background isolate. This puts iOS on par with Android for background execution.

Along with updated examples and Medium posts, this fixes [flutter/flutter#21925](https://github.com/flutter/flutter/issues/21925).
2019-02-15 11:18:56 -08:00
Jason Simmons
a0f4916009 Remove the Dart JIT snapshot data from AOT builds of the embedder library (flutter/engine#7806)
Also extend the embedder unit tests to cover AOT execution
2019-02-15 09:43:23 -08:00
Gary Qian
f85d8b60f5 Track flow id (flutter/engine#7826)
(Authored by @nathanrogersgoogle )
2019-02-14 12:30:29 -08:00
nathanrogersgoogle
7517ae90c3 Add flow events connecting pointer events to frames (flutter/engine#7807) 2019-02-13 22:27:12 -08:00
Stanislav Baranov
c50fe4fb9a Support for binary decompression of dynamic patches. (flutter/engine#7777) 2019-02-11 16:56:33 -08:00
Chinmay Garde
8d53a804f3 Allow embedders to specify pointer device IDs. (flutter/engine#7790) 2019-02-11 16:49:45 -08:00
Matt Carroll
4c7a50516c Recommended implementation of combining characters implementation. (flutter/engine#7758) 2019-02-11 15:27:55 -08:00
Jason Simmons
3a709976b2 Provide a default pressure range if a MotionEvent does not have a device (flutter/engine#7737)
Fixes https://github.com/flutter/flutter/issues/27641
2019-02-11 09:29:07 -08:00
KyleWong
e6b2d000dd Provide public api to allow FlutterEngine related context to be destoryed (flutter/engine#7610)
Provide public api to allow FlutterEngine related context  to be destoryed.
2019-02-09 17:13:04 +08:00
nathanrogersgoogle
69a16cbb01 Don't call OnAnimatorNotifyIdle if a frame is scheduled (flutter/engine#7746)
If a frame is scheduled by the time the delayed animator notify idle
task runs, then we should not call |NotifyIdle|.

Also, add a trace event in the task, to make it more clear in traces
when a notify idle call is coming from here (as opposed to
|Animator::AwaitVSync|).
2019-02-08 15:14:06 -08:00
Chris Bracken
8ff6f25fc1 Add flutter config to macOS targets (flutter/engine#7756)
In c3ad553 (#7642), //shell/platform/darwin:framework_shared was added
without the root flutter config, causing a build breakage in Fuchsia,
where flutter sits under //third_party/flutter as opposed to at the
root. The flutter root config is required to set -I../../third_party as
an include path.
2019-02-08 14:30:16 -08:00
Chinmay Garde
cb31ce37fa Document GPUSurfaceGLDelegate methods and move it to its own file. (flutter/engine#7755) 2019-02-08 14:21:47 -08:00
stuartmorgan
4c7fa286f3 Rename macOS framework to FlutterMacOS.framework (flutter/engine#7740)
Avoids potential confusion due to the iOS framework already being called
Flutter.framework.
2019-02-08 12:00:17 -08:00
Stanislav Baranov
34bfbdf99f Support for loading dynamic patches in AOT mode. (flutter/engine#7744)
* Dynamic patching support for AOT mode.

* Cleanup.
2019-02-08 10:47:01 -08:00
Chinmay Garde
46842b5f57 Update documentation for command line args in FlutterProjectArgs. (flutter/engine#7733) 2019-02-07 14:14:44 -08:00
Matt Carroll
a6cf9b2895 Introduced a number of Java system channels in io/flutter/embedding/engine/systemchannels/ (flutter/engine#7500) 2019-02-06 17:07:30 -08:00
Chris Bracken
7ff50beb59 Add FlutterProjectArgs::root_isolate_create_callback (flutter/engine#7651)
Allows embedders to specify a callback to be invoked in isolate scope
once root isolate has been created and marked runnable.

As an example of where this is useful, embedder unit test fixtures may
want to include Dart functions backed by a native implementation. On
isolate creation, this patch allows the unit test author to call
Dart_SetNativeResolver in root isolate scope.
2019-02-06 14:16:47 -08:00
liyuqian
2c4e59e1c6 Revert "Disable the persistent cache (#6835)" (flutter/engine#7689)
This reverts commit 366503ca2dd5297b7f73591330770b215b521c8c.

For https://github.com/flutter/flutter/issues/24058, We now only get a
"Program linking failed" error message on Windows Android simulators
without crahsing. Skia seems to have handled the linking failure in
https://skia-review.googlesource.com/c/skia/+/180372 by rebuilding the
program.
2019-02-05 11:17:21 -08:00
Matt Carroll
e1aeaf5dd4 Implemented Dark Mode for Android (#25525) (flutter/engine#7488) 2019-02-04 19:30:15 -08:00
Kaushik Iska
da09acaad9 Don't warn for Async texture uploads on Fuchsia (flutter/engine#7691) 2019-02-04 17:04:08 -08:00
stuartmorgan
c3ad553a23 Initial import of FDE macOS framework (flutter/engine#7642)
Merges the current flutter-desktop-embedding macOS framework into the
engine. Notable changes:
- All channel/codec related code is eliminated in favor of using the
  existing iOS implementations.
- All .m files renamed to .mm for consistency with the iOS code.
  - Some minor code changes to fix new warnings in Objective-C++ mode.
- License headers, basic format (e.g., clang-format changes) updated to
  use repo style.
- Xcode project is not included; instead adds GN build rules to create
  an integrated framework that combines what was the FDE library with
  what is present in FlutterEmbedder.framework.

Other changes are left as follow-ups, including:
- Moving shared code out of ios/ into common/.
- Potentially improving sharing between iOS and macOS BUILD.gn.
- Class renaming; the FLE prefix will be eliminated, but that API
  surface isn't stable yet, so that can be changed later.
2019-01-31 14:14:43 -08:00
Chris Bracken
03b5b4a509 Fix two typos in embedder docs (flutter/engine#7649) 2019-01-30 18:11:08 -08:00
Kaushik Iska
ec6f6c35b3 Expose the Flutter engine, Dart and Skia versions to Dart. (flutter/engine#7634)
- Moved versions from shell to common
- versions singleton contains all the required versions.
2019-01-30 16:22:45 -08:00
Chinmay Garde
f7b24f4d90 Document make_resource_current on FlutterOpenGLRendererConfig and warn if the callback is not set. (flutter/engine#7648) 2019-01-30 16:13:00 -08:00
Jason Simmons
8a941d7b3c Embed ICU data inside libflutter.so on Android (flutter/engine#7588)
Prior to this the Android embedder code would extract the icudtl.dat asset out
of the APK and write it to local disk during the first startup of the app.

This change will make that work unnecessary and eliminate the risk of ICU
failures due to errors in the extraction process.
2019-01-30 11:56:17 -08:00
stuartmorgan
9292896011 Rename FlutterResult in embedder.h (flutter/engine#7567)
FlutterResult is also the name of a class in the Objective-C API
surface, which is problematic when building a framework that contains
both (such as a macOS implementation of the Flutter framework).
2019-01-29 14:01:31 -08:00
Chinmay Garde
e361547b05 Allow the engine to redirect traces to systrace via settings. (flutter/engine#7617) 2019-01-28 17:39:31 -08:00
Chinmay Garde
1d7eebcc1b [embedder] Avoid looking for the kernel binary in AOT builds. (flutter/engine#7577) 2019-01-24 14:22:39 -08:00
Dan Field
de191d5476 Fix #26966 (flutter/engine#7566) 2019-01-24 12:36:23 -08:00
Qxyat
7c379b06b2 Don't accept gestures by ForwardingGestureRecognizer (flutter/engine#7558)
ForwardingGestureRecognizer was previously accepting the gesture when the touch sequence ended, this was causing some other gesture recognizers to not accept the gestures (e.g tapping on the my location button in a Google Map didn't work).
2019-01-23 09:28:55 -08:00
jslavitz
9b55d2ced1 fixes android pressure range (flutter/engine#7516) 2019-01-22 15:09:02 -08:00
Dan Field
8d6ec47a36 Keep engine alive if VC is not deallocated (flutter/engine#7544) 2019-01-22 15:03:25 -08:00
Jason Simmons
e2884a11f1 Remove the shell build target's dependency on the embedder library (flutter/engine#7549) 2019-01-22 14:38:19 -08:00
Brian Osman
3dd1198f0d Remove SkColorSpaceXformCanvas, use color-managed SkSurfaces instead (flutter/engine#7548)
Behavior (visual) changes should be very minor. Things that are to be expected:
* A few things were not color managed correctly by the transform canvas (color emoji, some color filters). Those will be handled correctly with the tagged surfaces (although we're always transforming to sRGB, so nothing should change until we target a wider gamut).
* Image filtering will happen in the source color space, rather than the destination. Very minor.
* The transform canvas did caching of images in the destination color space. Now, the conversion happens at draw time. If there are performance issues, images can be pre-converted to the destination with makeColorSpace().
2019-01-22 15:34:51 -05:00
Dan Field
1ffde0e2bd Update default flutter_assets path for iOS embedding (flutter/engine#7518) 2019-01-21 13:43:01 -08:00
KyleWong
6a671a1458 When the instance method:init is unavailable, mark the class method:new unavailable. (flutter/engine#7532) 2019-01-20 14:36:13 -08:00
Chinmay Garde
1f528fef75 Allow embedders to specify AOT snapshot buffers. (flutter/engine#7538) 2019-01-18 16:32:35 -08:00
Dan Field
1b3d586cfe Roll buildroot and update method of getting android SDK and support libs (flutter/engine#7284)
* Get support, use new SDK tooling from buildroot
* Roll NDK to 19
* Skip Android bits on Windows with note
2019-01-18 15:20:56 -08:00
Chinmay Garde
00fc057d88 Configure the embedder in AOT in "profile" and "release" runtime modes. (flutter/engine#7533) 2019-01-18 12:24:21 -08:00
Dan Field
e53df3e546 Ensure the ResourceContext is not ripped out from under dart (flutter/engine#7528)
* Ensure the ResourceContext is not ripped out from under dart
2019-01-17 13:55:44 -08:00
Chris Bracken
86d1e4f835 Deprecate FlutterProjectArgs.main_path, packages_path (flutter/engine#7497)
As of Dart 2, running from Dart source is no longer supported.  Dart
code should now be compiled to kernel form and will be loaded by from
kernel.blob in the assets directory. We retain the struct members for ABI
stability. package_path is also not required since kernel blobs are
self-contained.
2019-01-16 12:47:39 -08:00
KyleWong
8c111d9e25 Edit the bundleid so that it conform to UIT specifications. (flutter/engine#7503) 2019-01-16 11:35:39 -08:00
Stanislav Baranov
6d7e4f6eaf Validate dynamic patches before attempting to install (flutter/engine#7496)
This change adds explicit validation of dynamic patches in all places
where they're used, instead of only validating it in some places which
wasn't as reliable because some of the code paths were missed.

This change also moves utility functions that deal with validating
patches from ResourceExtractor to ResourceUpdater, to make them
available as API for other places in code that need this validation.
2019-01-15 18:09:25 -08:00
Brian Osman
16d11f7649 Switch to new SkColorSpace factory (flutter/engine#7480) 2019-01-15 09:50:46 -05:00
Jason Simmons
700bd140a2 Log errors returned from method channel invocations in the text input plugin (flutter/engine#7476)
See https://github.com/flutter/flutter/issues/25715
2019-01-14 17:26:05 -08:00
Dan Field
ea0b78bc5d Allow FlutterViewController to be released when not initialized with an engine (flutter/engine#6879)
* Break cycle between FlutterViewController and FlutterEngine
2019-01-14 16:58:09 -08:00
Dan Field
60a0e7aeb4 iOS A11y memory leak (flutter/engine#7244)
* fix memory leak in a11y bridge
2019-01-14 16:47:19 -08:00
Greg Spencer
da656186ed Add hover event support to the engine (flutter/engine#6961)
This adds support for passing ACTION_HOVER_MOVE events to the framework, in preparation for supporting mouse hover events on Android and ChromeOS.
2019-01-14 16:15:20 -08:00