-
Notifications
You must be signed in to change notification settings - Fork 46.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fiber] Animation priority work (#7466)
* High priority work Adds the ability to schedule and perform high priority work. In the noop renderer, this is exposed using a method `performHighPriWork(fn)` where the function is executed and all updates in that scope are given high priority. To do this, the scheduler keeps track of a default priority level. A new function `performWithPriority(priority, fn)` changes the default priority before calling the function, then resets it afterwards. * Rename overloaded priority terms "High" and "low" priority are overloaded terms. There are priority levels called HighPriority and LowPriority. Meanwhile, there are functions called {perform,schedule}HighPriWork, which corresponds to requestAnimationFrame, and {perform,schedule}LowPriWork, which corresponds to requestIdleCallback. But in fact, work that has HighPriority is meant to be scheduled with requestIdleCallback. This is super confusing. To address this, {perform,schedule}HighPriWork has been renamed to {perform,schedule}AnimationWork, and {perform,schedule}LowPriWork has been renamed to {perform,schedule}DeferredWork. HighPriority and LowPriority remain the same. * Priority levels merge fix
- Loading branch information
1 parent
3e54b28
commit 6144212
Showing
7 changed files
with
202 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.