- 31 8月, 2020 2 次提交
-
-
由 Chris Bracken 提交于
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.
-
由 Chris Bracken 提交于
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.
-
- 27 8月, 2020 1 次提交
-
-
由 Chris Bracken 提交于
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.
-
- 25 7月, 2020 1 次提交
-
-
由 Siva 提交于
* Manual merge or Dart into flutter a3815b6590...24c7666def dart-lang/sdk@24c7666def Update tests that have the current version number hardcoded dart-lang/sdk@f88ce7aef5 Increase Dart version to 2.10 * Update language version. * Update license. * Hpdate language version. * Update license.
-
- 13 6月, 2020 1 次提交
-
-
由 Yegor 提交于
* apply null safety syntax to mobile dart:ui
-
- 09 6月, 2020 1 次提交
-
-
由 Yegor 提交于
* nullability clean-ups
-
- 14 5月, 2020 1 次提交
-
-
由 Yegor 提交于
-
- 21 2月, 2020 1 次提交
-
-
由 vsmenon 提交于
* opt out dart:ui from nnbd * Annotate tests as well
-
- 17 1月, 2020 1 次提交
-
-
由 Dan Field 提交于
-
- 08 11月, 2018 1 次提交
-
-
由 Michael Goderbauer 提交于
-
- 18 1月, 2018 1 次提交
-
-
由 Ian Hickson 提交于
* Analysis cleanup of the Dart in the Engine repo * Update painting.dart * Update painting.dart
-
- 20 4月, 2017 1 次提交
-
-
由 Adam Barth 提交于
This name is consistent with how the other `dart:` libraries are named now.
-
- 30 9月, 2016 1 次提交
-
-
- 11 8月, 2016 1 次提交
-
-
由 Adam Barth 提交于
This change disentangles the build for the snapshotter from the main engine build. Also, we now have all the Dart files for dart:ui in the same directory.
-
- 13 10月, 2015 1 次提交
-
-
由 Adam Barth 提交于
This patch starts down the process of cleaning up the dart:ui API. In this approach, we use Dart code to specify the interface instead of IDL. The code in this patch is far from complete. It's just a sketch to see how this sort of approach might work.
-