523 Commits

Author SHA1 Message Date
Chris Yang
73ae0bb94c Fix iOS platform view's mask view blocking touch events. (flutter/engine#21286) 2020-09-21 15:22:47 -07:00
xster
e1cfc1ac6b Fix a AppLifecycleTest present time race between the animation and the rest of the test (flutter/engine#21107) 2020-09-14 08:50:16 -07:00
Chris Bracken
2586db3b22 Clean up C++ includes (flutter/engine#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Chris Bracken
eaa458dd36 Disable iOS application lifetime Scenario tests (flutter/engine#21125)
This speculatively disables the ApplicationLifecycle Scenarios iOS tests
which continue to fail after being re-enabled in flutter/engine#21087.

Related P0 issue: https://github.com/flutter/flutter/issues/61620
2020-09-11 16:12:22 -07:00
xster
a0944e63b4 re-enable scenario tests on iOS (flutter/engine#21088) 2020-09-11 09:21:37 -07:00
Chris Bracken
9ff7d7ca44 Copyright header hygiene improvements (flutter/engine#21089)
Add copyright headers in a few files where they were missing.

Trim trailing blank comment line where present, for consistency with
other engine code.

Use the standard libtxt copyright header in one file where it differed
(extra (C) and comma compared to other files in libtxt).

This also amends tools/const_finder/test/const_finder_test.dart to look
for a const an additional four lines down to account for the copyright
header added to the test fixture.
2020-09-11 08:55:37 -07:00
Chris Bracken
c117a411ae Re-enable (most) iOS Scenarios tests (flutter/engine#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 84995bd516d94a3a7e52e752ad666a8b22068498.
2020-09-10 22:57:56 -07:00
xster
7f02d137c3 add back a line to build host for scenario tests (flutter/engine#21076) 2020-09-10 21:05:03 -07:00
Chris Bracken
84995bd516 Disable iOS ScenariosTests suite (flutter/engine#21080)
This disables the macOS Scenarios app tests until a fix for the current
flakiness is found.

This also reverts commit 9ef075582e0dcaa4df990338b931219465ffcbce 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
9ef075582e Disable a flaky Scenarios test (flutter/engine#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
8e3ed9ca9f Delete unused iOS test scripts after LUCI change (flutter/engine#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
5ef8d060bc Revert "Enable lazy-async-stacks by-default in all modes (Take 3) (#20895)" (flutter/engine#21043)
This reverts commit 4200d23617a13ae4e477483ad43493dd36e4d00b.
2020-09-09 09:25:17 -07:00
Chris Bracken
753abd9f14 Update web lerpDouble to match C++ behaviour (flutter/engine#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
4200d23617 Enable lazy-async-stacks by-default in all modes (Take 3) (flutter/engine#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
f0520a07ab Update test Dart code to pass the latest Dart analyzer rules (flutter/engine#20986) 2020-09-03 18:09:05 -07:00
Dan Field
3dcd0fb2b7 Revert external size changes to Picture (flutter/engine#20950) 2020-09-02 13:42:25 -07:00
Dan Field
f83e92cbaf Use hint freed specifically for image disposal (flutter/engine#20754)
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00
Jim Graham
22e1f69704 Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (flutter/engine#20936)
This reverts commit 26659fa0fd05b2f3cc3c2e530298659702e1f869.
2020-09-01 21:21:07 -07:00
Alexander Brusher
26659fa0fd Adds fuchsia node roles to accessibility bridge updates. (flutter/engine#20385) 2020-09-01 13:33:02 -07:00
Emmanuel Garcia
2f8279900b Reland: Enable hybrid composition by default on Android (#20722) (flutter/engine#20864)
This reverts commit bb885a23e20d79c163dc884530acaafd6c311f2a.
2020-08-31 12:17:11 -07:00
Chris Bracken
5f363dcee6 Improve the precision of lerpDouble (flutter/engine#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
f113960205 lerpDouble: stricter handling of NaN and infinity (flutter/engine#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
d42e2f004c Extract Dart test utilities library (flutter/engine#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
399a7961cd Add integer input tests for lerpDouble (flutter/engine#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
6a210704a8 lerpDouble: add tests for NaN, infinity (flutter/engine#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
b3d1cff1a1 [fuchsia] Add fuchsia_ctl func to test script (flutter/engine#20827) 2020-08-27 17:38:02 -07:00
Gary Qian
cfe1db1146 Use Android R (API 30) getInsets() to compute padding (flutter/engine#18339) 2020-08-26 18:15:40 -07:00
Casey Hillers
ff18636371 Link to SDK version of script (flutter/engine#20798) 2020-08-26 16:03:01 -07:00
Kaushik Iska
5e969b46ef [embedder] Add gl present callback that takes present info (flutter/engine#20672) 2020-08-26 15:53:01 -07:00
Kaushik Iska
a47cc2d479 Revert "[fuchsia] Adds a test for clock change (#19993)" (flutter/engine#20790)
This reverts commit 8b200432726241370f374071448f13bd4f5bf94d.
2020-08-26 12:29:03 -07:00
Chris Bracken
d37e3846a8 Add tests for lerpDouble (flutter/engine#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
8b20043272 [fuchsia] Adds a test for clock change (flutter/engine#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
bb885a23e2 Revert "Enable hybrid composition by default on Android (#20722)" (flutter/engine#20745)
This reverts commit e57e7810a1c62535832abce02393e830fbd7f306.
2020-08-25 09:54:13 -07:00
Emmanuel Garcia
e57e7810a1 Enable hybrid composition by default on Android (flutter/engine#20722) 2020-08-24 13:10:23 -07:00
Jason Simmons
1945052c8e Remove image sizes from Picture::GetAllocationSize (flutter/engine#20673) 2020-08-21 16:26:02 -07:00
David Worsham
e335891caf fuchsia: Rollback broken SDK and re-enable test (flutter/engine#20699)
https://github.com/flutter/flutter/issues/64343
2020-08-21 16:05:36 -07:00
David Worsham
ee6a9a8755 fuchsia: Disable flaky test (flutter/engine#20697) 2020-08-21 12:26:15 -07:00
Chris Yang
23e891ddc8 Enable ios platform view by default (flutter/engine#20671) 2020-08-20 17:46:01 -07:00
Greg Spencer
a38b72119b Clean up scenario app scripts (flutter/engine#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
3a6e0d47c6 fuchsia: Convert legacy permutations to build flag (flutter/engine#20647) 2020-08-19 19:09:51 -07:00
Greg Spencer
c001ea6f4a Convert format script to Dart (flutter/engine#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
489c453c46 Update to android 30r2 and roll buildroot (flutter/engine#20479) 2020-08-17 16:33:48 -07:00
Mehmet Fidanboylu
fd10b885d8 Enable iOS plumbing for network security and add tests (flutter/engine#20492) 2020-08-16 21:20:26 -07:00
David Worsham
ad2bff1014 Reland: "fuchsia: Remove dead code / break dependencies" (flutter/engine#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
3fb3b05fdf Custom Gradle home and add .vpython file (flutter/engine#20425) 2020-08-14 15:01:01 -07:00
Dan Field
4d8aaaa337 Make sure ios tests fail if they fail (flutter/engine#20518)
* Make sure ios tests fail if they fail

* explain
2020-08-14 10:11:37 -07:00
xster
5ac78f5be6 Refactor initial route code take 2 (flutter/engine#20468) 2020-08-13 14:18:11 -07:00
gaaclarke
232d6c4fca Revert "Refactor initial route code (#19684)" (flutter/engine#20450)
This reverts commit 21404b56c6c183a829d9c758bec2330155e2d86d.
2020-08-12 12:43:08 -07:00
xster
21404b56c6 Refactor initial route code (flutter/engine#19684) 2020-08-11 19:52:04 -07:00
David Worsham
4e60afdf2a Fix broken shell_unittests on Fuchsia (flutter/engine#20422)
Fixes https://github.com/flutter/flutter/issues/53399
2020-08-11 17:31:25 -07:00