534 Commits

Author SHA1 Message Date
fredlee12345678
572c343568
add checker board for clip_path,clip_rect,clip_rrect,physical_shap_layer (#20997) 2020-09-30 10:27:11 -07:00
bungeman
a6a6fd163b
Replace kLegacyFontHost_InitType with kUnknown_SkPixelGeometry. (#21474)
Skia is removing the deprecated legacy display setting globals and
associated kLegacyFontHost_InitType. This change replaces all such uses
with default surface properties with no special flags and an unknown
pixel geometry. Flutter never set the associated globals, leaving them
with their initial default values, which were no special flags and
horizontal RGB pixel geometry. The values used here are different but
this change should make no difference as Flutter never mentions
SkFont::kSubpixelAntiAlias to take advantage of the pixel geometry.
2020-09-29 12:46:08 -04:00
George Wright
5eff2d5420
Run embedder_tests on Fuchsia CI (#21462) 2020-09-28 12:22:02 -07:00
Dan Field
08cf7256d8
Fix getNextFrame (#21422) 2020-09-25 17:26:59 -07:00
Alexander Brusher
de5f2b48fb
Revert "Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (#20936)" (#21367)
This reverts commit 96efe39272a2850092c9a1445dc5406dbe1fb645.
2020-09-25 11:07:10 -07:00
Ian Hickson
ee71df706a
Revert "Make drain() consistently asynchronous. (#21062)" (#21391)
This reverts commit cdc631c4338455f292f68c110d584870753e0160.
2020-09-24 18:19:53 -07:00
Ian Hickson
cdc631c433
Make drain() consistently asynchronous. (#21062) 2020-09-23 22:17:02 -07:00
Dan Field
2ea7e5230b
isCloneOf for Image (#21371)
* isCloneOf for Image

* Update docs, add missing impl
2020-09-23 21:09:44 -07:00
Dan Field
b49de93b33
Create an ImageHandle wrapper (#21057)
Allows for reference counting of images before disposal.

This will allow multiple callers to hold a reference to an image and dispose of their reference without disposing the underlying image until all handles have been disposed.

This will be used by the framework to help resolve some of the kludge I was trying to introduce in flutter/flutter#64582
2020-09-23 14:33:29 -07:00
Richard Cai
515f339838
Update docs specifying addPlatformView offset param is not used (#21331)
for Android and iOS and remove offset from scenario_app test for iOS and Android.
2020-09-23 10:37:57 -07:00
Chris Yang
678653bfb6
Fix iOS platform view's mask view blocking touch events. (#21286) 2020-09-21 15:22:47 -07:00
xster
257eba9c19
Fix a AppLifecycleTest present time race between the animation and the rest of the test (#21107) 2020-09-14 08:50:16 -07:00
Chris Bracken
08dabe9601
Clean up C++ includes (#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
6e4af80e7e
Disable iOS application lifetime Scenario tests (#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
397b6c6a93
re-enable scenario tests on iOS (#21088) 2020-09-11 09:21:37 -07:00
Chris Bracken
36f7f3ca82
Copyright header hygiene improvements (#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
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