Commit Graph

96 Commits

Author SHA1 Message Date
Chris Bracken 72cbe69cc8 Fix two typos in embedder.h (#7993)
occured -> occurred
preceeded -> preceded
2019-02-27 21:10:08 -08:00
Chris Bracken 3e4e6f5c54 Provide batching for semantics updates (#7988)
Some embedders prefer to minimise the number of semantics node/custom
action updates sent back to the host platform -- for example due to
expensive serialisation mechanisms, etc.

This patch provides a 'batch end' signal that provides embedders with an
indication of when a self-consistent set of semantics node or custom action
updates have been sent.

We overload the node/action ID with information that conveys a batch end
by using an ID (-1) that is never allotted to semantics nodes by the
framework.
2019-02-27 12:12:45 -08:00
Ben Konyi fb1c543dd4 Link dart:* sources into engine for debugger source support (#7908)
Link dart:* sources into engine for debugger source support

Currently, dart:* libraries appear to have no source in
debuggers like Observatory. With this change, these sources will be
available in debug mode applications. Sources for dart:* libraries are
lazily loaded on a script-by-script basis.

Refer to https://dart-review.googlesource.com/c/sdk/+/93375 for the Dart
SDK change.
2019-02-26 13:28:04 -08:00
Chris Bracken f2489c1b5d Correct FlutterSemanticsNode member name style (#7942)
Correct struct members whose names were camelCase rather than
snake_case. This is a breaking API change, but does not break ABI.
2019-02-24 22:33:55 -08:00
Chinmay Garde 33bb91cc15 Allow embedders to specify a vsync waiter. (#7914)
Fixes https://github.com/flutter/flutter/issues/28240
2019-02-21 23:02:32 -08:00
Chinmay Garde 4cb9a14992 Allow embedders to add events to the timeline. (#7917)
Fixes https://github.com/flutter/flutter/issues/28283
2019-02-21 22:42:49 -08:00
Jason Simmons 043d92c48a Embedder API for setting the persistent cache path (#7915)
Fixes https://github.com/flutter/flutter/issues/28278
2019-02-21 17:30:17 -08:00
Chris Bracken abe9826a9d Add accessibility semantics support to embedder (#7891)
Flutter's accessibility APIs consist of three main calls from the
embedder to the Dart application:

  1. FlutterEngineUpdateSemanticsEnabled: enables/disables semantics support.

  2. FlutterEngineUpdateAccessibilityFeatures: sets embedder-specific
     accessibility features.

  3. FlutterEngineDispatchSemanticsAction: dispatches an action (tap,
     long-press, scroll, etc.) to a semantics node.

and two main callbacks triggered by Dart code:

  1. FlutterUpdateSemanticsNodeCallback: notifies the embedder of
     updates to the properties of a given semantics node.

  2. FlutterUpdateSemanticsCustomActionCallback: notifies the embedder
     of updates to custom semantics actions registered in Dart code.

In the Flutter framework, when accessibility is first enabled, the
embedder will receive a stream of update callbacks notifying the
embedder of the full semantics tree. On further changes in the Dart
application, only updates will be sent.
2019-02-20 18:59:29 -08:00
Chinmay Garde 684c9394c0 Respect the custom GL proc table when creating the resource context on the IO thread. (#7893)
Fixes https://github.com/flutter/flutter/issues/28229
2019-02-20 17:23:14 -08:00
stuartmorgan ed73fc39cd Expose more pointer phases in embedder.h (#7813)
Adds 'add', 'remove', and 'hover' to the set of pointer phases that are
available to embedders. This is necessary for them to send hover events
to the engine.
2019-02-19 07:06:57 -08:00
Jason Simmons 0ca1d1f318 Remove the Dart JIT snapshot data from AOT builds of the embedder library (#7806)
Also extend the embedder unit tests to cover AOT execution
2019-02-15 09:43:23 -08:00
nathanrogersgoogle e2394ad77e Add flow events connecting pointer events to frames (#7807) 2019-02-13 22:27:12 -08:00
Chinmay Garde 87b40ba974 Allow embedders to specify pointer device IDs. (#7790) 2019-02-11 16:49:45 -08:00
Chinmay Garde 4f3eb42dfd Update documentation for command line args in FlutterProjectArgs. (#7733) 2019-02-07 14:14:44 -08:00
Chris Bracken ce07399180 Add FlutterProjectArgs::root_isolate_create_callback (#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
Chris Bracken 7fa77ef03a Fix two typos in embedder docs (#7649) 2019-01-30 18:11:08 -08:00
Chinmay Garde 64e17076c1 Document make_resource_current on FlutterOpenGLRendererConfig and warn if the callback is not set. (#7648) 2019-01-30 16:13:00 -08:00
stuartmorgan 474d8837a9 Rename FlutterResult in embedder.h (#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 0dedb56d2f [embedder] Avoid looking for the kernel binary in AOT builds. (#7577) 2019-01-24 14:22:39 -08:00
Brian Osman 50ddc3712f Remove SkColorSpaceXformCanvas, use color-managed SkSurfaces instead (#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
Chinmay Garde 898b4f8da4 Allow embedders to specify AOT snapshot buffers. (#7538) 2019-01-18 16:32:35 -08:00
Chinmay Garde a0b4d6b617 Configure the embedder in AOT in "profile" and "release" runtime modes. (#7533) 2019-01-18 12:24:21 -08:00
Chris Bracken 1e93a8eb39 Deprecate FlutterProjectArgs.main_path, packages_path (#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 b058920cab Edit the bundleid so that it conform to UIT specifications. (#7503) 2019-01-16 11:35:39 -08:00
Chinmay Garde 26e02aaa23 Wire up support for external OpenGL textures for the embedder. (#7087) 2019-01-09 15:21:39 -08:00