Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller Scene] Use std::chrono for animation durations#38606

Merged
bdero merged 2 commits into
flutter-team-archive:mainfrom
bdero:bdero/use-chrono
Jan 3, 2023
Merged

[Impeller Scene] Use std::chrono for animation durations#38606
bdero merged 2 commits into
flutter-team-archive:mainfrom
bdero:bdero/use-chrono

Conversation

@bdero

@bdero bdero commented Jan 3, 2023

Copy link
Copy Markdown
Contributor

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.

@bdero bdero requested review from chinmaygarde and zanderso January 3, 2023 06:07
@bdero bdero self-assigned this Jan 3, 2023
@flutter-dashboard

Copy link
Copy Markdown

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.

Comment thread impeller/scene/animation/animation.cc Outdated
}

Scalar Animation::GetEndTime() const {
std::chrono::duration<Scalar> Animation::GetEndTime() const {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, done.

@bdero bdero requested a review from chinmaygarde January 3, 2023 19:32
@bdero bdero force-pushed the bdero/use-chrono branch from 95b099f to 14315f4 Compare January 3, 2023 19:41
@bdero bdero force-pushed the bdero/use-chrono branch from 14315f4 to 2703ae7 Compare January 3, 2023 20:22
@bdero bdero merged commit 2213b80 into flutter-team-archive:main Jan 3, 2023
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Jan 3, 2023
…ations (flutter-team-archive/engine#38606) (#117935)

Commit: dbd36fb1331abb7417b2047a49d52e88e5460f33
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jan 4, 2023
* 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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants