1. 25 10月, 2020 2 次提交
    • S
    • C
      Fix _lerpInt precision bug (#22089) · 6e0262d3
      Chris Bracken 提交于
      Fixes a precision bug was introduced in 784e6d74, which improved the
      precision of lerpDouble when the extrema differed significantly in
      magnitude.
      
      _lerpInt doesn't have this issue since the extrema are passed as 64-bit
      twos-complement values, therefore the difference will always be accurate
      so long as it doesn't overflow. This reverts the _lerpInt implementation
      to the original a + (b - a) * t, but adds a test to avoid a regression
      if anyone is tempted to make it consistent with the others.
      6e0262d3
  2. 24 10月, 2020 16 次提交
  3. 23 10月, 2020 20 次提交
  4. 22 10月, 2020 2 次提交
    • C
      Isolates launched by the engine instance use the settings of that instance. (#22052) · defa8be2
      Chinmay Garde 提交于
      This regression was introduced in https://github.com/flutter/engine/pull/21820
      for sound-null safety. The settings used to launch the VM were incorrectly used
      to determine the isolate lifecycle callbacks. Since the first shell/engine in
      the process also starts the VM, these objects are usually identical. However,
      for subsequent engine shell/engine launches, the callbacks attached to the new
      settings object would be ignored. The unit-test harness is also structured in
      such a way that each test case tears down the VM before the next. So all
      existing tests created a bespoke VM for the test run, and, the tests that did
      create multiple isolates did not also test attaching callbacks to the settings
      object.
      
      Fixes https://github.com/flutter/engine/pull/22041
      defa8be2
    • C
      Ensure root isolate create callback is invoked before the isolate is in the running phase. (#22041) · f459a866
      Chinmay Garde 提交于
      Embedders that have access to the Dart native API (only Fuchsia now) may perform
      library setup in the isolate create callback. The engine used to depend on the
      fact the root isolate entrypoint is invoked in the next iteration of message
      loop (via the `_startIsolate` trampoline in `isolate_patch.dart`) to ensure that
      library setup occur before the main entrypoint was invoked. However, due to
      differences in the way in which message loops are setup in Fuchsia, this
      entrypoint was run before the callback could be executed. Dart code on Fuchsia
      also has the ability to access the underlying event loops directly. This patch
      moves the invocation of the create callback to before user dart code has a
      chance to run. This difference in behavior on Fuchsia became an issue when the
      isolate initialization was reworked in https://github.com/flutter/engine/pull/21820
      for null-safety.
      
      Another issue was discovered in that the callback was being invoked twice, I
      fixed that too and added a test.
      
      Fixes https://github.com/flutter/flutter/issues/68732
      f459a866