215 Commits

Author SHA1 Message Date
xster
dd71e7be8e
remove extra redundant channels setup in iOS embedding engine (#11886) 2019-09-05 11:13:04 -07:00
liyuqian
4243324a03
Revert "Add a BroadcastStream to FrameTiming (#11041)" (#11841)
This reverts commit e97ed36e580c9b4c4a3d768cfe1a520f7bf8161d.

Reason for revert: Stream is considered a bad API: https://github.com/flutter/engine/pull/11041#issuecomment-526892247
2019-09-05 10:41:55 -07:00
Matt Carroll
3aafd0f971
Updated API usage in scenario app by deleting unnecessary method. (#11844) 2019-09-03 19:25:54 -07:00
xster
6a0ca8dc78
Let java unit tests build with autoninja (#11799) 2019-08-30 20:10:29 -07:00
Michael Klimushyn
0287144fa3
Assert that the JUnit tests are running on Java 8 (#11466) 2019-08-27 10:38:52 -07:00
Chris Bracken
92c63e848a
Ensure trailing newline before EOF in C++ sources (#11489)
In generated text fixture location lookup code:
When the second argument to write_file() is a list, it is written one
item per line to the path specified by the first argument. This ensures
that we emit a trailing newline at EOF to comply with -Wnewline-eof.

Elsewhere:
Lack of a newline at EOF was undefined behaviour prior to C++11. The
Fuchsia tree sets -Wnewline-eof in its buildroot, so we plan to do the
same. This cleans up remaining first-party C++ sources that don't
include a trailing newline.
2019-08-27 00:13:00 -07:00
Amir Hardon
a34f9a811c
Skip empty platform view overlays. (#11427)
This change sets up a "spying canvas" to try and detect empty canvases.
When using platform views with a custom embedder, if a platform view
overlay canvas is known to be empty we skip creating a compositor layer
for that overlay.
2019-08-26 11:40:49 -07:00
liyuqian
4d83ef8c7f
Support non-60 refresh rate on PerformanceOverlay (#11419)
So we can get the correct graph on 90fps/120fps devices :)

See https://github.com/flutter/flutter/issues/37888
2019-08-24 15:22:52 -07:00
Chinmay Garde
b7d03138ed
Remove deprecated ThreadTest::GetThreadTaskRunner and use the newer CreateNewThread API. (#11395)
We will end up creating fewer threads in tests.
2019-08-23 12:21:46 -07:00
Dan Field
cffa8b0c94
Update scenarios readme (#11374)
This is out of date.
2019-08-22 11:12:04 -07:00
Dan Field
1efb5b770c
update sim script (#11355) 2019-08-21 13:10:34 -07:00
Dan Field
4b5ffb0a90
Firebase test for Platform Views on iOS (#11350) 2019-08-21 12:48:39 -07:00
Chinmay Garde
ba51408257
Reference the Flutter framework instead of the dylib in iOS tests. (#11337) 2019-08-21 00:04:01 -07:00
Dan Field
c8f02c95ea
Add tests for platform views (#11319) 2019-08-20 20:48:40 -07:00
liyuqian
e97ed36e58
Add a BroadcastStream to FrameTiming (#11041)
Without this, developers have to override `onReportTimings` to listen for `FrameTiming`.
That can potentially break previous `onReportTimings` listeners if they forget to call
the old listener in their new callback.

This PR replaces the similar RP in the framework: https://github.com/flutter/flutter/pull/38574

Once this PR landed, we'll have to create another framework PR to use the stream to replace
`onReportTimings` usages.

Once that's done, we can then propose the breaking change of removing the deprecated
`onReportTimings`.
2019-08-19 10:52:16 -07:00
Michael Klimushyn
1e1eb4d34a
Minor update to the Robolectric test harness (#11067)
Make sure that any `android.util.Log`s during the tests are reported to
stdout.
2019-08-16 16:25:59 -07:00
Shi-Hao Hong
014ab76ad0
Pass Android Q insets.systemGestureInsets to Window (#10413)
* Pass Android Q system gesture inset information from insets.systemGestureInsets to Window.systemGestureInsets
2019-08-16 13:42:56 -04:00
liyuqian
a7c965caec
Hide verbose dart snapshot during run_test.py (#11040)
Without this change, a single dart test will print out 306 lines.
With this change, a single dart test will only print out 33 lines.
This helps a lot in local tests.

In order to return to the old logging, set `--verbose-dart-snapshot` flag.
2019-08-15 16:40:30 -07:00
Matt Carroll
5bb144ca8b
Re-lands platform brightness support on iOS, plus platform contrast (#10791) 2019-08-15 14:51:07 -07:00
Dan Field
938b4d94c5
remove OS version (#11033) 2019-08-15 13:42:19 -07:00
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 65fd5d4d629a2150cf85566857ab0bd2ddeb3d5a.
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 16c0058f17403b219a596de993ece5dd7f768b3d.

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
Jason Simmons
da0fcf8284
Updates to the engine test runner script (#9934)
* Use separate filters for engine executables and Dart test scripts
* Do not run the benchmarks on Cirrus
2019-07-19 17:00:18 -07:00
Jason Simmons
48b1340ad7
Fix the geometry test to reflect that OffsetBase comparison operators are a partial ordering (#9925) 2019-07-19 12:59:27 -07:00
gaaclarke
3d7f93a2e7
Removed logic from FlutterAppDelegate into FlutterPluginAppLifeCycleDelegate (#9893)
Removed logic from FlutterAppDelegate into
FlutterPluginAppLifeCycleDelegate.  This is a better place for
add-to-app since it doesn't require them to use our app delegate.
2019-07-19 10:58:39 -07:00
Jason Simmons
9e0477643e
Update the exception thrown for invalid data in the codec test (#9929) 2019-07-18 15:54:32 -07:00
Jason Simmons
f20e9350d2
Fix failure of the onReportTimings window hook test (#9923) 2019-07-18 14:42:33 -07:00