Commit Graph

195 Commits

Author SHA1 Message Date
Dan Field 4f00cb745c Add script for running ios Tests on simulator (#10999) 2019-08-14 12:43:33 -07:00
Dan Field 90656d8824 Add isDisplayingFlutterUI to FlutterViewController (#10816) 2019-08-14 09:10:22 -07:00
Chinmay Garde e8f954409d Allow embedder controlled composition of Flutter layers. (#10195)
This patch allows embedders to split the Flutter layer tree into multiple
chunks. These chunks are meant to be composed one on top of another. This gives
embedders a chance to interleave their own contents between these chunks.

The Flutter embedder API already provides hooks for the specification of
textures for the Flutter engine to compose within its own hierarchy (for camera
feeds, video, etc..). However, not all embedders can render the contents of such
sources into textures the Flutter engine can accept. Moreover, this composition
model may have overheads that are non-trivial for certain use cases. In such
cases, the embedder may choose to specify multiple render target for Flutter to
render into instead of just one.

The use of this API allows embedders to perform composition very similar to the
iOS embedder. This composition model is used on that platform for the embedding
of UIKit view such and web view and map views within the Flutter hierarchy.
However, do note that iOS also has threading configurations that are currently
not available to custom embedders.

The embedder API updates in this patch are ABI stable and existing embedders
will continue to work are normal. For embedders that want to enable this
composition mode, the API is designed to make it easy to opt into the same in an
incremental manner.

Rendering of contents into the “root” rendering surface remains unchanged.
However, now the application can push “platform views” via a scene builder.
These platform views need to handled by a FlutterCompositor specified in a new
field at the end of the FlutterProjectArgs struct.

When a new platform view in introduced within the layer tree, the compositor
will ask the embedder to create a new render target for that platform view.
Render targets can currently be OpenGL framebuffers, OpenGL textures or software
buffers. The type of the render target returned by the embedder must be
compatible with the root render surface. That is, if the root render surface is
an OpenGL framebuffer, the render target for each platform view must either be a
texture or a framebuffer in the same OpenGL context. New render target types as
well as root renderers for newer APIs like Metal & Vulkan can and will be added
in the future. The addition of these APIs will be done in an ABI & API stable
manner.

As Flutter renders frames, it gives the embedder a callback with information
about the position of the various platform views in the effective hierarchy.
The embedder is then meant to put the contents of the render targets that it
setup and had previously given to the engine onto the screen (of course
interleaving the contents of the platform views).

Unit-tests have been added that test not only the structure and properties of
layer hierarchy given to the compositor, but also the contents of the texels
rendered by a test compositor using both the OpenGL and software rendering
backends.

Fixes b/132812775
Fixes flutter/flutter#35410
2019-08-13 14:53:19 -07:00
Dan Field e22893966a Expose isolateId for engine (#10823) 2019-08-12 21:20:59 -07:00
Michael Klimushyn c92a0d992a Report JUnit test failures (#10941)
Previously this script was not reporting any JUNit failures and somehow
ended up included a non-existent jar for Java tests to test against.

It looks like one of the JUnit tests is now failing. Disabling it for
now to turn on CI again as soon as possible, will fix and enable it in a
follow up.
2019-08-12 12:17:15 -07:00
Dan Field 79c50123a8 iOS JIT support and enhancements for scenarios app (#10820)
* Make the scripts runnable from any directory

* Add JIT script for iOS
2019-08-12 09:10:12 -07:00
Dan Field ff49ca1c6e Make firebase test more LUCI friendly (#10783) 2019-08-08 21:47:24 -07:00
Chinmay Garde 7cfb3de69b Revert "Forwards iOS dark mode trait to the Flutter framework (#34441). (#9722)" (#10789)
This reverts commit 65fd5d4d62.
2019-08-08 17:15:06 -07:00
Matt Carroll 65fd5d4d62 Forwards iOS dark mode trait to the Flutter framework (#34441). (#9722) 2019-08-08 16:22:45 -07:00
Dan Field 33c53c876b Specify which android variant for tests (#10717) 2019-08-08 16:16:51 -07:00
liyuqian 620b8998f8 Revert "Remove semi-redundant try-jobs. (#10485)" (#10705)
This reverts commit 16c0058f17.

Our infra should be capable to run all those deleted tests as now we've throttled the Fuchsia auto-rollers.

The current throttle is 1 PR / 3 hours for the 4 rollers:
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-mac-toolchain-flutter-engine.json?l=53
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-mac-sdk-flutter-engine.json?g=0&l=53
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-linux-toolchain-flutter-engine.json?g=0&l=56
- https://cs.corp.google.com/skia/buildbot/autoroll/config/fuchsia-linux-sdk-flutter-engine.json?g=0&l=56

We're changing them to 1 PR / 12 hours: http://skbug.com/9322
2019-08-07 16:21:41 -07:00
Dan Field 4c406ba976 Test perf overlay gold on Linux (#10703) 2019-08-07 13:47:00 -07:00
Shi-Hao Hong 797f032b7b Rolls engine to Android SDK 29 and its corresponding tools (#10692)
* Rolls engine to Android SDK 29 and its corresponding tools

* Update from android-28 to android-29 in relevant files

* Roll buildroot to tip of tree
2019-08-07 12:34:33 -04:00
Chinmay Garde 16c0058f17 Remove semi-redundant try-jobs. (#10485)
We are severely resource constrained on the tryjobs. This is hindering progress on ToT due to scheduling failures and rate limits. There are no plans to requisition more resources in this infra scheme as the migration to tryjobs on LUCI is the preferred way forward. This patch removes presubmits that are somewhat redundant. Each removed presubmit and the justification is given below:

* `build_and_test_linux_opt_release`: The AOT variant is tested by `build_and_test_linux_opt_profile` (actually its replacement, see the next point).
* `build_and_test_linux_opt_profile`: When we build the host profile variant for Android, we test it as well instead of building the extra variant (since we already need a host for a target build).
* `build_and_test_android_unopt_debug`: `gen_javadoc` have been moved to the profile variant. `Roboelectric` tests have been moved to profile variant. JIT infra will be tested by the the host tests.
* ToT framework checks: These will be performed (by the autoroller)[https://autoroll.skia.org/r/flutter-engine-flutter-autoroll?tab=status] which also has a sheriff rotation. This will also avoid us having to ignore red presubmits on manual changes.

Everything else is left as-is. To be clear, this causes strictly less checks to be performed on each commit.
2019-08-06 16:16:06 -07:00
Chinmay Garde 8caf61c0d4 Document the thread test fixture. (#10637) 2019-08-05 13:51:56 -07:00
Dan Field 63b253d907 expose max depth on Window (#10414) 2019-08-02 20:37:24 -07:00
Matt Carroll f336e05a69 Android Embedding PR37: Separated FlutterActivity and FlutterFragment via FlutterActivityAndFragmentDelegate (#9895) 2019-07-29 17:40:25 -07:00
Dan Field aea0d7a651 test scenario_app on CI (#10065) 2019-07-26 15:59:18 -07:00
gaaclarke a4778eafb1 Removed unnecessary call to find the App.framework. (#10178) 2019-07-26 12:17:22 -07:00
gaaclarke 2dc03ab517 Added integration test that tests that the first frame callback is called (#10145) 2019-07-26 10:33:24 -07:00
gaaclarke 250ee31649 Started linking the test targets against Flutter. (#10128)
I tried to get this in quick without tests to avoid future
conflicts and wasted time reimplementing the same thing.
2019-07-25 13:41:16 -07:00
Dan Field a0ec52886b Embedding testing app (#10007) 2019-07-23 12:41:03 -07:00
Michael Klimushyn 8ed5da8b65 Add working Robolectric tests (#9954)
`gclient sync` now grabs Robolectric, JUnit, and their transitive
runtime dependencies. They're being stored in a new CIPD package,
`flutter/android/robolectric_bundle`.

`shell/platform/android/BUILD.gn` has a new target for building the
tests, `robolectric_tests`. `testing/run_tests.py` has been extended to
build and run the new target. Runs the android tests under
"build_and_test_android" on CI.

This also adds some very simple sample tests to start with and a README
to the java tests directory.
2019-07-23 09:06:19 -07:00
Jason Simmons 8fda1c99b1 Fix return type of assert function in gradient_test (#9961) 2019-07-19 18:55:48 -07:00
Jason Simmons 736c28b359 Update Dart engine tests to check for assertion failures only when running in debug mode (#9959) 2019-07-19 18:27:16 -07:00