- 11 9月, 2020 1 次提交
-
-
由 Chris Bracken 提交于
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.
-
- 09 9月, 2020 1 次提交
-
-
由 Chris Bracken 提交于
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.
-
- 04 9月, 2020 1 次提交
-
-
由 Jason Simmons 提交于
-
- 03 9月, 2020 1 次提交
-
-
由 Dan Field 提交于
-
- 02 9月, 2020 2 次提交
-
-
由 Jim Graham 提交于
This reverts commit 58a62076.
-
由 Alexander Brusher 提交于
-
- 31 8月, 2020 3 次提交
-
-
由 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.
-
由 Chris Bracken 提交于
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.
-
- 30 8月, 2020 1 次提交
-
-
由 Chris Bracken 提交于
The `a` and `b` parameters to `lerpDouble` have type `num`. This adds tests for integer parameter values.
-
- 29 8月, 2020 1 次提交
-
-
由 Chris Bracken 提交于
Adds tests for lerpDouble for cases where NaN or infinite values are passed. These tests simply specify the current behaviour.
-
- 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.
-
- 22 8月, 2020 1 次提交
-
-
由 Jason Simmons 提交于
-
- 15 8月, 2020 1 次提交
-
-
由 David Worsham 提交于
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
-
- 08 8月, 2020 1 次提交
-
-
由 Ming Lyu (CareF) 提交于
-
- 07 8月, 2020 1 次提交
-
-
由 Zachary Anderson 提交于
This reverts commit 12a37478.
-
- 04 8月, 2020 1 次提交
-
-
由 David Worsham 提交于
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
-
- 01 8月, 2020 1 次提交
-
-
由 Jim Graham 提交于
-
- 29 7月, 2020 2 次提交
- 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.
-
- 22 7月, 2020 1 次提交
-
-
由 Dan Field 提交于
Refactors instantiateImageCodec and decodeImageFromPixels to provide intermediate data about the image width, height, and bytes per pixel. This allows for more fine grained control from Dart, particularly when trying to reason about how or whether to maintain aspect ratio in the targetWidth/targetHeight parameters. This leaves the existing methods functional by re-implementing them to use the new ImmutableBuffer/ImageDescriptor class. The ImmutableBuffer class is provided so that callers can avoid copying the image data multiple times if they wish to re-recreate the image descriptor. Related Issues
-
- 19 6月, 2020 1 次提交
-
-
由 Dan Field 提交于
Adds an `allowUpscale` parameter to the Dart interfaces for instantiateImageCodec and decodeImageFromPIxels. If set to false, the image bounds will be clamped at their intrinsic dimensions. A later commit will change the default to true.
-
- 16 6月, 2020 1 次提交
-
-
由 Gary Qian 提交于
-
- 13 6月, 2020 1 次提交
-
-
由 Yegor 提交于
* apply null safety syntax to mobile dart:ui
-
- 05 6月, 2020 1 次提交
-
-
由 Dan Field 提交于
-
- 04 6月, 2020 1 次提交
-
-
由 Dan Field 提交于
* Implement GetAllocationSize for Vertices * Reflect vertex buffer size in pictures
-
- 03 6月, 2020 1 次提交
-
-
由 Dan Field 提交于
Make images contribute to Picture allocation size, more aggressively release references when dispose is called (#18706) SkImage references get held by both our Image and Picture objects. The GC has no idea about this, and so sometimes pictures look very small when they're actually holding a reference to a large chunk of memory. This patch helps make sure that the GC can more adequately catch the real size impact of Picture objects, and combined with an upstream patch in Dart allows for much more aggressive collection of unused image related memory.
-
- 03 4月, 2020 2 次提交
-
- 02 4月, 2020 1 次提交
-
- 28 3月, 2020 1 次提交
-
-
由 Dan Field 提交于
-
- 27 3月, 2020 1 次提交
-
-
由 Gary Qian 提交于
-
- 25 3月, 2020 1 次提交
-
-
由 Gary Qian 提交于
-
- 28 2月, 2020 1 次提交
-
-
由 Dan Field 提交于
-
- 21 2月, 2020 1 次提交
-
-
由 vsmenon 提交于
* opt out dart:ui from nnbd * Annotate tests as well
-
- 30 1月, 2020 1 次提交
-
-
由 Gary Qian 提交于
-
- 29 1月, 2020 1 次提交
-
- 28 1月, 2020 1 次提交
-
-
由 Gary Qian 提交于
-
- 17 1月, 2020 1 次提交
-
-
由 Dan Field 提交于
-