518 Commits

Author SHA1 Message Date
Chris Bracken
bdaac368f8
Re-enable (most) iOS Scenarios tests (#21087)
This re-enables the iOS Scenarios tests which have been flaky in the
last couple days.

Disabling two tests where we've seen the flakes:
* AppLifecycleTests testFlutterViewControllerDetachingSendsApplicationLifecycle
* FlutterViewControllerInitialRouteTest testSettingInitialRoute

This reverts commit 0c6c265a6f38bcacf551690a8fc8f78bb4f2c285.
2020-09-10 22:57:56 -07:00
xster
216a1ab64d
add back a line to build host for scenario tests (#21076) 2020-09-10 21:05:03 -07:00
Chris Bracken
0c6c265a6f
Disable iOS ScenariosTests suite (#21080)
This disables the macOS Scenarios app tests until a fix for the current
flakiness is found.

This also reverts commit 55d447a1c3e124e4b1ae6c8a1230808412657a85 where
one test was previously disabled. However, another started failing soon
after, so instead we disable the whole suite here.
2020-09-10 19:50:03 -07:00
Chris Bracken
55d447a1c3
Disable a flaky Scenarios test (#21075)
This disables the macOS Scenarios app test
testFlutterViewControllerDetachingSendsApplicationLifecycle
until a fix for the flakiness is found.

Related issue: https://github.com/flutter/flutter/issues/61620
2020-09-10 13:21:17 -07:00
xster
7ebab5dc8a
Delete unused iOS test scripts after LUCI change (#18712)
This deletes old LUCI build scripts that have been unused since
https://flutter-review.googlesource.com/c/recipes/+/3160
2020-09-09 18:22:45 -07:00
Zachary Anderson
f7c7b41f0a
Revert "Enable lazy-async-stacks by-default in all modes (Take 3) (#20895)" (#21043)
This reverts commit 575a51948d81756c778352b40f639fa557325fd7.
2020-09-09 09:25:17 -07:00
Chris Bracken
cf8c6b8ba1
Update web lerpDouble to match C++ behaviour (#21010)
This updates the web_ui implementation of lerpDouble to match the
behaviour of the C++ engine implementation in dart:ui.

Specifically this covers the following changes:
* #20871: stricter handling of NaN and infinity
* #20879: Improve the precision of lerpDouble

lerpDouble: stricter handling of NaN and infinity (#20871)
----------------------------------------------------------

Previously, the behaviour of lerpDouble with respect to NaN and infinity
was relatively complex and difficult to reason about. This patch
simplifies the behaviour with respect to those conditions and adds
documentation and tests.

In general, if `a == b` or both values are null, infinite, or NaN, `a`
is returned. Otherwise we require `a` and `b` and `t` to be finite or
null and the result of the linear interpolation is returned.

Improve the precision of lerpDouble (#20879)
--------------------------------------------

Reduces errors caused by the loss of floating point precision when the
two extrema of the lerp differ significantly in magnitude. Previously,
we used the calculation:

    a + (b - a) * t

When the difference in magnitude between `a` and `b` exceeds the
precision representable by double-precision floating point math, `b - a`
results in the larger-magnitude value of `a` or `b`. The error between
the value produced and the correct value is then scaled by t.

A simple example of the impact can be seen when `a` is significantly
larger in magnitude than `b`. In that case, `b - a` results in `a` and
when `t` is 1.0, the resulting value is `a - (a) * 1.0 == 0`.

The patch transforms the computation to the mathematically-equivalent
expression:

    a * (1.0 - t) + b * t

By scaling each value independently, the behaviour is more accurate.
From the point of view of performance, this adds an extra
multiplication, but multiplication is relatively cheap and the behaviour
is significantly better.

This patch also adds a `precisionErrorTolerance` constant to
test_utils.dart and migrates existing tests to use `closeTo()` for
testing.

The tests themselves *do* currently use values that have an exact
floating-point representation, but we should allow for flexibility in
future implementation changes.
2020-09-08 16:04:11 -07:00
Clement Skau
575a51948d
Enable lazy-async-stacks by-default in all modes (Take 3) (#20895)
Lazy async stacks were already enabled by-default in AOT mode in [0] - which made the
gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks".

This change does the same with the engine defaults, which makes this be enabled
by-default in JIT mode as well.

See go/dart-10x-faster-async for more information.

This is a re-land: A fix for what we believe to have caused the last revert has landed upstream in Dart in dart-lang/sdk@0004589

[0] flutter/flutter@3478232
2020-09-07 10:55:48 +02:00
Jason Simmons
0f0ae681e8
Update test Dart code to pass the latest Dart analyzer rules (#20986) 2020-09-03 18:09:05 -07:00
Dan Field
c700479db5
Revert external size changes to Picture (#20950) 2020-09-02 13:42:25 -07:00
Dan Field
634e499bcc
Use hint freed specifically for image disposal (#20754)
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00
Jim Graham
96efe39272
Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (#20936)
This reverts commit 58a62076559585b167c89531dfb81092d744a552.
2020-09-01 21:21:07 -07:00
Alexander Brusher
58a6207655
Adds fuchsia node roles to accessibility bridge updates. (#20385) 2020-09-01 13:33:02 -07:00
Emmanuel Garcia
5e54c707e8
Reland: Enable hybrid composition by default on Android (#20722) (#20864)
This reverts commit 4de62c7c2659607acdc75ab8c1ccd305a3c6f9d1.
2020-08-31 12:17:11 -07:00
Chris Bracken
784e6d746e
Improve the precision of lerpDouble (#20879)
Reduces errors caused by the loss of floating point precision when the
two extrema of the lerp differ significantly in magnitude. Previously,
we used the calculation:

    a + (b - a) * t

When the difference in magnitude between `a` and `b` exceeds the
precision representable by double-precision floating point math, `b - a`
results in the larger-magnitude value of `a` or `b`. The error between
the value produced and the correct value is then scaled by t.

A simple example of the impact can be seen when `a` is significantly
larger in magnitude than `b`. In that case, `b - a` results in `a` and
when `t` is 1.0, the resulting value is `a - (a) * 1.0 == 0`.

The patch transforms the computation to the mathematically-equivalent
expression:

    a * (1.0 - t) + b * t

By scaling each value independently, the behaviour is more accurate.
From the point of view of performance, this adds an extra
multiplication, but multiplication is relatively cheap and the behaviour
is significantly better.

This patch also adds a `precisionErrorTolerance` constant to
test_utils.dart and migrates existing tests to use `closeTo()` for
testing.

The tests themselves *do* currently use values that have an exact
floating-point representation, but we should allow for flexibility in
future implementation changes.
2020-08-30 22:26:10 -07:00
Chris Bracken
dbc9b1a856
lerpDouble: stricter handling of NaN and infinity (#20871)
Previously, the behaviour of lerpDouble with respect to NaN and infinity
was relatively complex and difficult to reason about. This patch
simplifies the behaviour with respect to those conditions and adds
documentation and tests.

In general, if `a == b` or both values are null, infinite, or NaN, `a`
is returned. Otherwise we require `a` and `b` and `t` to be finite or
null and the result of the linear interpolation is returned.
2020-08-30 11:08:59 -07:00
Chris Bracken
14ac65c9a2
Extract Dart test utilities library (#20874)
This extracts a Dart test utilities library, containing
`expectAssertion` and `expectArgumentError` functions that simplify
running tests that test assertions across debug, profile, and release
configurations.

This change also restricts Dart unit tests to testing files whose
filename matches `*_test.dart` under `flutter/testing/dart`; previously
any file in that directory was run, but all files matched the above
pattern.
2020-08-30 11:07:05 -07:00
Chris Bracken
e0122b88c2
Add integer input tests for lerpDouble (#20880)
The `a` and `b` parameters to `lerpDouble` have type `num`. This adds
tests for integer parameter values.
2020-08-29 16:48:41 -07:00
Chris Bracken
308bde7d6a
lerpDouble: add tests for NaN, infinity (#20848)
Adds tests for lerpDouble for cases where NaN or infinite values are
passed. These tests simply specify the current behaviour.
2020-08-28 15:11:15 -07:00
Casey Hillers
25a23baeee
[fuchsia] Add fuchsia_ctl func to test script (#20827) 2020-08-27 17:38:02 -07:00
Gary Qian
93f17e9ea6
Use Android R (API 30) getInsets() to compute padding (#18339) 2020-08-26 18:15:40 -07:00
Casey Hillers
a065920a41
Link to SDK version of script (#20798) 2020-08-26 16:03:01 -07:00
Kaushik Iska
1892e031f2
[embedder] Add gl present callback that takes present info (#20672) 2020-08-26 15:53:01 -07:00
Kaushik Iska
5952760acf
Revert "[fuchsia] Adds a test for clock change (#19993)" (#20790)
This reverts commit 3fe49ec35d38342407a230d8860a4d647e436ae5.
2020-08-26 12:29:03 -07:00
Chris Bracken
388193a67b
Add tests for lerpDouble (#20778)
The behaviour of lerpDouble with respect to null inputs isn't entirely
obvious. In the case where both inputs are null, it returns null.
Otherwise, it defaults the null parameter to 0.0 and carries on.

Post non-null by default, it might be nice to strengthen the parameter
contract to require them to be non-null. While this would be a breaking
change, it seems likely that the framework either meets this guarantee
or can provide it without a framework breaking change.

https://github.com/flutter/flutter/issues/64617 tracks the above.

In the meantime, adding a test to lock in the current behaviour.
2020-08-26 11:32:15 -07:00
Filip Filmar
3fe49ec35d
[fuchsia] Adds a test for clock change (#19993)
This is a Fuchsia-only shell test, confirming that when the timezone
setting is changed on the realm via Fuchsia's FIDL interface
`fuchsia.settings.Intl`, the Dart isolate running in that realm receives
the change and starts reporting the appropriate timestamp.

We already have a [similar test][tst] that verifies the timezones in the
dart VM matches the local timezone at start, but there was no test that
also verified timezone changes.

[tst]: https://github.com/flutter/engine/blob/master/shell/common/shell_unittests.cc#L1166

See issue #61284
2020-08-25 16:24:25 -07:00
Emmanuel Garcia
4de62c7c26
Revert "Enable hybrid composition by default on Android (#20722)" (#20745)
This reverts commit d16ba48e1d79cf0197e96c51c38300ee921baeb0.
2020-08-25 09:54:13 -07:00
Emmanuel Garcia
d16ba48e1d
Enable hybrid composition by default on Android (#20722) 2020-08-24 13:10:23 -07:00
Jason Simmons
e09af86a26
Remove image sizes from Picture::GetAllocationSize (#20673) 2020-08-21 16:26:02 -07:00
David Worsham
fe8c154452
fuchsia: Rollback broken SDK and re-enable test (#20699)
https://github.com/flutter/flutter/issues/64343
2020-08-21 16:05:36 -07:00
David Worsham
158eacd843
fuchsia: Disable flaky test (#20697) 2020-08-21 12:26:15 -07:00
Chris Yang
b6035062ff
Enable ios platform view by default (#20671) 2020-08-20 17:46:01 -07:00
Greg Spencer
d1e9017cd8
Clean up scenario app scripts (#20641)
I just made a pass on the scenario scripts so that they can be more easily run from the scenario directory, set the ANDROID_HOME correctly, and generally fixed lint errors.

Also compile_android_aot.sh didn't appear to work, and I think I fixed it (it builds now).
2020-08-19 19:14:38 -07:00
David Worsham
4dc866283d
fuchsia: Convert legacy permutations to build flag (#20647) 2020-08-19 19:09:51 -07:00
Greg Spencer
35640af9fa
Convert format script to Dart (#20572)
This converts the ci/format.sh script to a Dart script that uses process_runner and isolates to multi-process the clang-format, diffs, and grepping needed to do the formatting changes.

It also will (by default) only check the formatting of changed files.

The user can optionally check all files (--all-files) or do only some types of checks with --check. --verbose prints the versions of the tools used for Clang format and Java format.

Specifying --fix will cause any formatting errors that would have been detected to be fixed.
2020-08-18 13:25:30 -07:00
Gary Qian
02de4eb7ce
Update to android 30r2 and roll buildroot (#20479) 2020-08-17 16:33:48 -07:00
Mehmet Fidanboylu
3aff256928
Enable iOS plumbing for network security and add tests (#20492) 2020-08-16 21:20:26 -07:00
David Worsham
5a2bf6aa4c
Reland: "fuchsia: Remove dead code / break dependencies" (#20532)
Reland #19396 with a fix for improper scale that was affecting internal tests

Tested: Ran all unittests, ran internal tests, and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-14 20:41:18 -07:00
Emmanuel Garcia
429675d310
Custom Gradle home and add .vpython file (#20425) 2020-08-14 15:01:01 -07:00
Dan Field
b32a2a5b05
Make sure ios tests fail if they fail (#20518)
* Make sure ios tests fail if they fail

* explain
2020-08-14 10:11:37 -07:00
xster
0c504da039
Refactor initial route code take 2 (#20468) 2020-08-13 14:18:11 -07:00
gaaclarke
2ac5b3460a
Revert "Refactor initial route code (#19684)" (#20450)
This reverts commit 8d08e6c369e349986831d83204a79af3fcb8d8ca.
2020-08-12 12:43:08 -07:00
xster
8d08e6c369
Refactor initial route code (#19684) 2020-08-11 19:52:04 -07:00
David Worsham
6381b1511b
Fix broken shell_unittests on Fuchsia (#20422)
Fixes https://github.com/flutter/flutter/issues/53399
2020-08-11 17:31:25 -07:00
Emmanuel Garcia
8c02e38992
Prepare scenario app to run on Android emulator on LUCI (#20350) 2020-08-10 22:55:43 -07:00
Ming Lyu (CareF)
409a5e5963
FrameTiming build start timestamp fix and add vsync start timestamp (#20229) 2020-08-07 19:41:01 -07:00
Emmanuel Garcia
ecc934e636
Add script to compile JIT on x86 (#20315) 2020-08-07 15:29:01 -07:00
Zachary Anderson
47c1c61a92
Revert "fuchsia: Remove dead code / break dependencies (#19396)" (#20302)
This reverts commit 12a37478de2cc9aff7f8fc72bc3a47f5f02e083c.
2020-08-06 12:06:06 -07:00
David Worsham
12a37478de
fuchsia: Remove dead code / break dependencies (#19396)
The fuchsia code around metrics and sizing was just sending this
information through a side-channel, when the engine already had the
information available. So, delete all of it to make future CLs simpler.

Additionally, the SceneUpdateContext has many unneccesary dependencies
re: metrics and PaintTasks. Break those to make future CLs simpler.

Tested: Ran all unittests and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-03 22:09:26 -07:00
David Worsham
033dd45607
Disable flaky fuchsia test (#20217) 2020-08-03 21:40:23 -07:00