[Impeller Scene] Use std::chrono for animation durations#38606
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| } | ||
|
|
||
| Scalar Animation::GetEndTime() const { | ||
| std::chrono::duration<Scalar> Animation::GetEndTime() const { |
There was a problem hiding this comment.
I'd put this in //flutter/impeller/base/timing.h and typedef it to SecondsF along with other related stuff from chrono. Something like this perhaps. Your call though. As it reads, duration<Scalar> is a bit unclear.
95b099f to
14315f4
Compare
14315f4 to
2703ae7
Compare
…ations (flutter-team-archive/engine#38606) (#117935) Commit: dbd36fb1331abb7417b2047a49d52e88e5460f33
* 64e7336 Roll Plugins from b202b3db98dc to e85f8ac1502d (3 revisions) (flutter/flutter#117875) * fe8dcf6 [flutter_tools] timeline_test.dart flaky (flutter/flutter#116667) * f190559 7e51aef0a Roll Skia from fde37f5986fd to 809e328ed55c (1 revision) (flutter-team-archive/engine#38596) (flutter/flutter#117874) * ccfd14b Updated to tokens v0.150. (flutter/flutter#117350) * b9ead37 Simplify null check. (flutter/flutter#117026) * 084be5e Roll Flutter Engine from 7e51aef0a1be to 1d2ba73d1059 (9 revisions) (flutter/flutter#117923) * fdc25a1 Reland "Remove single-view assumption from ScrollPhysics (#117503)" (flutter/flutter#117916) * 6b9f1c2 Minor documentation fix on BorderRadiusDirectional.zero (flutter/flutter#117661) * 889e35b fix typos (flutter/flutter#117592) * bd69ef7 c0b3f8fce Make `AccessibilityBridge` a `AXPlatformTreeManager` (flutter-team-archive/engine#38610) (flutter/flutter#117931) * a7942e8 Add convenience constructors for SliverList (flutter/flutter#116605) * dbd36fb 2213b80dd [Impeller Scene] Use std::chrono for animation durations (flutter-team-archive/engine#38606) (flutter/flutter#117935) * 9080d1a Reland "Add support for double tap and drag for text selection #109573" (flutter/flutter#117502) * 63653e8 == override parameters are non-nullable (flutter/flutter#117839) * 906761c Fix the message strings for xcodeMissing and xcodeIncomplete (flutter/flutter#117922) * e599e5c 32c468507 Roll quiver to 3.2.1 (flutter-team-archive/engine#38617) (flutter/flutter#117942) * c53501d Send text direction in selection rects (flutter/flutter#117436) * 025ce11 Correctly propagate verbosity to subtasks in flutter.gradle (flutter/flutter#117897)
Follow-up to #38595. 32 bit floats are plenty precise for the animation system, so I just kept the use of float-backed seconds everywhere to keep the conversions to a minimum.