Revert "Use highest priority lane to detect interruptions (#21088)"

This reverts commit b4044f8a07323bcad7d55cbaedc35c35b4acf7e0.

Instead of LanePriority.

I'm removing all uses of LanePriority so I can delete it.
This commit is contained in:
Andrew Clark
2021-04-28 11:56:55 -05:00
parent c6702656ff
commit 86f3385d9a
2 changed files with 10 additions and 12 deletions
@@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
// bother waiting until the root is complete.
(wipLanes & suspendedLanes) === NoLanes
) {
const nextLane = getHighestPriorityLane(nextLanes);
const wipLane = getHighestPriorityLane(wipLanes);
getHighestPriorityLanes(wipLanes);
const wipLanePriority = return_highestLanePriority;
if (
// Tests whether the next lane is equal or lower priority than the wip
// one. This works because the bits decrease in priority as you go left.
nextLane >= wipLane ||
nextLanePriority <= wipLanePriority ||
// Default priority updates should not interrupt transition updates. The
// only difference between default updates and transition updates is that
// default updates do not support refresh transitions.
(nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes)
(nextLanePriority === DefaultLanePriority &&
wipLanePriority === TransitionPriority)
) {
// Keep working on the existing in-progress tree. Do not interrupt.
return wipLanes;
@@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
// bother waiting until the root is complete.
(wipLanes & suspendedLanes) === NoLanes
) {
const nextLane = getHighestPriorityLane(nextLanes);
const wipLane = getHighestPriorityLane(wipLanes);
getHighestPriorityLanes(wipLanes);
const wipLanePriority = return_highestLanePriority;
if (
// Tests whether the next lane is equal or lower priority than the wip
// one. This works because the bits decrease in priority as you go left.
nextLane >= wipLane ||
nextLanePriority <= wipLanePriority ||
// Default priority updates should not interrupt transition updates. The
// only difference between default updates and transition updates is that
// default updates do not support refresh transitions.
(nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes)
(nextLanePriority === DefaultLanePriority &&
wipLanePriority === TransitionPriority)
) {
// Keep working on the existing in-progress tree. Do not interrupt.
return wipLanes;