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

Conversation

@naudzghebre
Copy link
Contributor

@naudzghebre naudzghebre commented Dec 2, 2021

  • VSyncWaiter on Fuchsia will defer firing until frame start time

The common vsync waiter implementation expects this invariant to be
held.

  • Add a test for vsync_waiter

Original bug: b/208443497
CP request: b/208711800

@flutter-dashboard
Copy link

This pull request was opened against a branch other than master. Since Flutter pull requests should not normally be opened against branches other than master, I have changed the base to master. If this was intended, you may modify the base back to fuchsia_f6. See the Release Process for information about how other branches get updated.

Reviewers: Use caution before merging pull requests to branches other than master, unless this is an intentional hotfix/cherrypick.

@flutter-dashboard flutter-dashboard bot changed the base branch from fuchsia_f6 to master December 2, 2021 19:27
@naudzghebre naudzghebre changed the base branch from master to fuchsia_f6 December 2, 2021 19:29
std::string prefix = "vsync_waiter_test";

fml::MessageLoop::EnsureInitializedForCurrentThread();
auto platform_task_runner = fml::MessageLoop::GetCurrent().GetTaskRunner();
Copy link
Member

@chinmaygarde chinmaygarde Dec 2, 2021

Choose a reason for hiding this comment

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

This test is failing because the the unit-tests don't always have a default task runner setup which makes GetCurrent unsafe. The way to fix this would be to create a thread (you are already using a thread host so add flutter::ThreadHost::Type::PLATFORM to it and and use its task runner). Please don't FML_USED_ON_EMBEDDER as that is may not work in all unit-test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, ok. Disregard the latest push. Amended FML_USED_ON_EMBEDDER before seeing your comment.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that define is used by embedder platforms that depend on a default message loop already setup. The engine internals don't use that by default and we added the deprecation explicitly to trip accidentally calling the accessor instead of holding references to a task runner.

@naudzghebre naudzghebre force-pushed the fuchsia_f6 branch 2 times, most recently from 4329f90 to d4a69a5 Compare December 2, 2021 21:14
…ter#29287)

* VSyncWaiter on Fuchsia will defer firing until frame start time

The common vsync waiter implementation expects this invariant to be
held.

* Add a test for vsync_waiter
@naudzghebre naudzghebre merged commit 1789394 into flutter:fuchsia_f6 Dec 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants